diff options
author | Justin Squirek <squirek@adacore.com> | 2021-11-22 12:53:56 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2022-01-06 17:11:32 +0000 |
commit | 4458909a806825bc9a74b69e14c7fb88a551b800 (patch) | |
tree | 70dedcc038494ce0cdd8e31da5fb2b456d1cbec9 /gcc/ada/par.adb | |
parent | bfbb8de66079be551f08cdab38cafa766bb29e78 (diff) |
[Ada] Removal of technical debt
gcc/ada/
* exp_ch6.adb (Add_Simple_Call_By_Copy_Code): Add comments
regarding special handling of components which depend on
discriminants.
* exp_dist.adb (Build_From_Any_Function): Add Real_Rep actual
for calls to Has_Stream_Attribute_Definition.
(Build_To_Any_Function): Likewise.
(Build_TypeCode_Function): Likewise.
* freeze.adb (Freeze_Entity): Add missing comment for Test_E.
* libgnat/s-utf_32.adb: Remove disabled warning comments and
temporarily inserted pragma warnings. Remove very old (2006 and
2012) comments about bootstrapping older versions.
* par.adb (P_Identifier): Add new parameter Force_Msg.
* par-ch2.adb (P_Identifier): Restructure and clean up function.
* par-ch3.adb (P_Defining_Identifier): Remove code duplication
for parsing identifiers.
* sem_attr.adb (Stream_Attribute_Available): Add missing
comments and add Real_Rep actual for calls to
Has_Stream_Attribute_Definition.
* sem_cat.adb (Has_Read_Write_Attribute): Add Real_Rep actual
for calls to Has_Stream_Attribute_Definition.
(Has_Stream_Attribute_Definition): Remove local Real_Rep and fix
recursive calls. Add default value for Real_Rep.
* sem_cat.ads (Has_Stream_Attribute_Definition): Add new out
parameter "Real_Rep".
* sem_type.adb (Add_Entry): Add condition to avoid passing
non-function calls to Function_Interp_Has_Abstract_Op.
(Function_Interp_Has_Abstract_Op): Add missing comments and
remove check for Is_Overloadable.
* sem_util.adb (Derivation_Too_Early_To_Inherit): Remove
duplicated code.
Diffstat (limited to 'gcc/ada/par.adb')
-rw-r--r-- | gcc/ada/par.adb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ada/par.adb b/gcc/ada/par.adb index 312c41100d5..c577d283c42 100644 --- a/gcc/ada/par.adb +++ b/gcc/ada/par.adb @@ -649,10 +649,16 @@ function Par (Configuration_Pragmas : Boolean) return List_Id is -- procedure more than once for the same pragma. All parse-time pragma -- handling must be prepared to handle such multiple calls correctly. - function P_Identifier (C : Id_Check := None) return Node_Id; + function P_Identifier + (C : Id_Check := None; + Force_Msg : Boolean := False) return Node_Id; -- Scans out an identifier. The parameter C determines the treatment -- of reserved identifiers. See declaration of Id_Check for details. + -- An appropriate error message, pointing to the token, is also issued + -- if either this is the first occurrence of misuse of this identifier, + -- or if Force_Msg is True. + function P_Pragmas_Opt return List_Id; -- This function scans for a sequence of pragmas in other than a -- declaration sequence or statement sequence context. All pragmas |