diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2016-04-18 12:46:40 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2016-04-18 12:46:40 +0200 |
commit | 87feba051d2870479fab45d2a8671bc4e6d7817f (patch) | |
tree | 6b79a0b34a4ee6a589bdc031cfa4e17af7e81b98 /gcc/ada/namet.adb | |
parent | 3e20cb680fae4486f196dcc807237d573ad6d207 (diff) | |
download | gcc-87feba051d2870479fab45d2a8671bc4e6d7817f.zip gcc-87feba051d2870479fab45d2a8671bc4e6d7817f.tar.gz gcc-87feba051d2870479fab45d2a8671bc4e6d7817f.tar.bz2 |
[multiple changes]
2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
* namet.adb, namet.ads, exp_unst.adb: Minor reformatting.
2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
* sem_eval.adb (Choice_Matches): Check the expression
against the predicate values when the choice denotes a
subtype with a static predicate.
(Eval_Membership_Op): Code cleanup. Remove the suspicious guard which
tests for predicates.
(Is_OK_Static_Subtype): A subtype with a dynamic predicate
is not static. (Is_Static_Subtype): A subtype with a dynamic
predicate is not static.
* sem_eval.ads (Is_OK_Static_Subtype): Update the comment on usage.
(Is_Static_Subtype): Update the comment on usage.
2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Analyze_Input_Item): Allow
generic formals to appear as initialization items.
2016-04-18 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb (Analyze_Stream_TSS_Definition,
Has_Good_Profile): Additional error message to indicate that
the second parameter of the subprogram must be a first subtype.
2016-04-18 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Analyze_Subprogram_Body_Helper, Is_Inline_Pragma):
Use the pragma lookahead that determines whether a subprogram
is to be inlined, when some level of backend optimization is
required.
* sem_ch12.ads, sem_ch12.adb (Add_Pending_Instantiation): Factorize
code used to create an instance body when needed for inlining.
* exp_ch6.adb (Expand_Call): When a call is to be inlined, and the
call appears within an instantiation that is not a compilation
unit, add a pending instantiation for the enclosing instance,
so the backend can inline in turn the calls contained in the
inlined body.
From-SVN: r235124
Diffstat (limited to 'gcc/ada/namet.adb')
-rw-r--r-- | gcc/ada/namet.adb | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/gcc/ada/namet.adb b/gcc/ada/namet.adb index 20359f6..4ba68df 100644 --- a/gcc/ada/namet.adb +++ b/gcc/ada/namet.adb @@ -140,6 +140,7 @@ package body Namet is procedure Append (Buf : in out Bounded_String; Id : Name_Id) is pragma Assert (Id in Name_Entries.First .. Name_Entries.Last); S : constant Int := Name_Entries.Table (Id).Name_Chars_Index; + begin for J in 1 .. Natural (Name_Entries.Table (Id).Name_Len) loop Append (Buf, Name_Chars.Table (S + Int (J))); @@ -420,7 +421,9 @@ package body Namet is ---------------------------------- procedure Append_Decoded_With_Brackets - (Buf : in out Bounded_String; Id : Name_Id) is + (Buf : in out Bounded_String; + Id : Name_Id) + is P : Natural; begin @@ -560,8 +563,7 @@ package body Namet is -- Append_Unqualified -- ------------------------ - procedure Append_Unqualified - (Buf : in out Bounded_String; Id : Name_Id) is + procedure Append_Unqualified (Buf : in out Bounded_String; Id : Name_Id) is begin Append (Buf, Id); Strip_Qualification_And_Suffixes (Buf); @@ -572,7 +574,9 @@ package body Namet is -------------------------------- procedure Append_Unqualified_Decoded - (Buf : in out Bounded_String; Id : Name_Id) is + (Buf : in out Bounded_String; + Id : Name_Id) + is begin Append_Decoded (Buf, Id); Strip_Qualification_And_Suffixes (Buf); @@ -908,8 +912,12 @@ package body Namet is ---------------- procedure Insert_Str - (Buf : in out Bounded_String; S : String; Index : Positive) is + (Buf : in out Bounded_String; + S : String; + Index : Positive) + is SL : constant Natural := S'Length; + begin Buf.Chars (Index + SL .. Buf.Length + SL) := Buf.Chars (Index .. Buf.Length); @@ -1468,7 +1476,9 @@ package body Namet is -------------------------------- procedure Set_Character_Literal_Name - (Buf : in out Bounded_String; C : Char_Code) is + (Buf : in out Bounded_String; + C : Char_Code) + is begin Buf.Length := 0; Append (Buf, 'Q'); |