diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-02 10:19:12 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-02 10:19:12 +0200 |
commit | 8830d1d2a25268b60eba9b47d62f4ddabec6d428 (patch) | |
tree | 5ec4ad08a684c346266510b4329c35436cd34b03 | |
parent | 7ff2d2343921f5baeba0b47983202a84852e2957 (diff) | |
download | gcc-8830d1d2a25268b60eba9b47d62f4ddabec6d428.zip gcc-8830d1d2a25268b60eba9b47d62f4ddabec6d428.tar.gz gcc-8830d1d2a25268b60eba9b47d62f4ddabec6d428.tar.bz2 |
[multiple changes]
2011-08-02 Robert Dewar <dewar@adacore.com>
* sem_ch8.adb, aspects.ads: Minor reformatting.
2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
* sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
* sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
extracted from...
(Analyze_Aspect_Specifications): ...here. Call above procedure.
From-SVN: r177094
-rw-r--r-- | gcc/ada/ChangeLog | 11 | ||||
-rwxr-xr-x | gcc/ada/aspects.ads | 8 | ||||
-rw-r--r-- | gcc/ada/sem_ch13.adb | 37 | ||||
-rw-r--r-- | gcc/ada/sem_ch13.ads | 1 | ||||
-rw-r--r-- | gcc/ada/sem_ch8.adb | 1 |
5 files changed, 47 insertions, 11 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 65fb0dc..886bad5 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,14 @@ +2011-08-02 Robert Dewar <dewar@adacore.com> + + * sem_ch8.adb, aspects.ads: Minor reformatting. + +2011-08-02 Eric Botcazou <ebotcazou@adacore.com> + + * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline. + * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure + extracted from... + (Analyze_Aspect_Specifications): ...here. Call above procedure. + 2011-08-02 Yannick Moy <moy@adacore.com> * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal diff --git a/gcc/ada/aspects.ads b/gcc/ada/aspects.ads index e2e7e6f..773bf49 100755 --- a/gcc/ada/aspects.ads +++ b/gcc/ada/aspects.ads @@ -88,9 +88,11 @@ package Aspects is Aspect_Universal_Data, -- GNAT -- Remaining aspects have a static boolean value that turns the aspect - -- on or off. They all correspond to pragmas, and the flag Aspect_Cancel - -- is set on the pragma if the corresponding aspect is False. These are - -- also Boolean aspects as defined below. + -- on or off. They all correspond to pragmas, but are only converted to + -- the pragmas where the value is True. A value of False normally means + -- that the aspect is ignored, except in the case of derived types where + -- the aspect value is inherited from the parent, in which case, we do + -- not allow False if we inherit a True value from the parent. Aspect_Ada_2005, -- GNAT Aspect_Ada_2012, -- GNAT diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index 59a1cb5..ac03bd9 100644 --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -78,6 +78,16 @@ package body Sem_Ch13 is -- inherited from a derived type that is no longer appropriate for the -- new Esize value. In this case, we reset the Alignment to unknown. + procedure Analyze_Non_Null_Aspect_Specifications + (N : Node_Id; + E : Entity_Id; + L : List_Id); + -- This procedure is called to analyze aspect specifications for node N. + -- E is the corresponding entity declared by the declaration node N, and + -- L is the list of aspect specifications for this node. This procedure + -- does the real work, as opposed to Analyze_Aspect_Specifications which + -- is inlined to fast-track the common case. + procedure Build_Predicate_Function (Typ : Entity_Id; N : Node_Id); -- If Typ has predicates (indicated by Has_Predicates being set for Typ, -- then either there are pragma Invariant entries on the rep chain for the @@ -688,6 +698,25 @@ package body Sem_Ch13 is E : Entity_Id; L : List_Id) is + begin + -- Return if no aspects + + if L = No_List then + return; + end if; + + Analyze_Non_Null_Aspect_Specifications (N, E, L); + end Analyze_Aspect_Specifications; + + -------------------------------------------- + -- Analyze_Non_Null_Aspect_Specifications -- + -------------------------------------------- + + procedure Analyze_Non_Null_Aspect_Specifications + (N : Node_Id; + E : Entity_Id; + L : List_Id) + is Aspect : Node_Id; Aitem : Node_Id; Ent : Node_Id; @@ -715,12 +744,6 @@ package body Sem_Ch13 is -- Set True if delay is required begin - -- Return if no aspects - - if L = No_List then - return; - end if; - -- Loop through aspects Aspect := First (L); @@ -1198,7 +1221,7 @@ package body Sem_Ch13 is <<Continue>> Next (Aspect); end loop; - end Analyze_Aspect_Specifications; + end Analyze_Non_Null_Aspect_Specifications; ----------------------- -- Analyze_At_Clause -- diff --git a/gcc/ada/sem_ch13.ads b/gcc/ada/sem_ch13.ads index 80d44e6..a2726fd 100644 --- a/gcc/ada/sem_ch13.ads +++ b/gcc/ada/sem_ch13.ads @@ -46,6 +46,7 @@ package Sem_Ch13 is -- the call is ignored. Note that we can't use a simpler interface of just -- passing the node N, since the analysis of the node may cause it to be -- rewritten to a node not permitting aspect specifications. + pragma Inline (Analyze_Aspect_Specifications); procedure Adjust_Record_For_Reverse_Bit_Order (R : Entity_Id); -- Called from Freeze where R is a record entity for which reverse bit diff --git a/gcc/ada/sem_ch8.adb b/gcc/ada/sem_ch8.adb index 2472474..a883c4d 100644 --- a/gcc/ada/sem_ch8.adb +++ b/gcc/ada/sem_ch8.adb @@ -2697,7 +2697,6 @@ package body Sem_Ch8 is Mark := First (Subtype_Marks (N)); while Present (Mark) loop Use_One_Type (Mark, Installed => True); - Next (Mark); end loop; |