diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-08-02 09:05:58 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-08-02 09:05:58 +0000 |
commit | 3bf0edc61006a0d62405526b5feacc582817a019 (patch) | |
tree | cb9b7a1d6235246bd0d94db6e3ea4af1b309ef91 /gcc/ada/errout.ads | |
parent | 93449281c468eadf81fdc93223b7eb858a346062 (diff) | |
download | gcc-3bf0edc61006a0d62405526b5feacc582817a019.tar.gz |
2011-08-02 Yannick Moy <moy@adacore.com>
* errout.adb, errout.ads (Check_Formal_Restriction): new procedure
which issues an error in formal mode if its argument node is originally
from source
* sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
has a discriminant specification so that it does not include the case
of derived types
(Derived_Type_Declaration): move here the test that a derived type has a
discriminant specification
* sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
first element of a component association before accessing its choices
(presence of component association is not enough)
* exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
declaration is a library item before accessing the next element in a
list, as library items are not member of lists
* sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
Check_Formal_Restriction whenever possible.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177099 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/errout.ads')
-rw-r--r-- | gcc/ada/errout.ads | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ada/errout.ads b/gcc/ada/errout.ads index 57b8efe0abb..933f58dad5e 100644 --- a/gcc/ada/errout.ads +++ b/gcc/ada/errout.ads @@ -740,6 +740,13 @@ package Errout is -- the given text. This text may contain insertion characters in the -- usual manner, and need not be the same length as the original text. + procedure Check_Formal_Restriction (Msg : String; N : Node_Id); + -- Provides a wrappper on Error_Msg_F which prepends the special characters + -- "|~~" (error not serious, language prepended) provided: + -- * the current mode is formal verification. + -- * the node N comes originally from source. + -- Otherwise, does nothing. + function First_Node (C : Node_Id) return Node_Id; -- Given a construct C, finds the first node in the construct, i.e. the -- one with the lowest Sloc value. This is useful in placing error msgs. |