aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/errout.ads
diff options
context:
space:
mode:
authorEtienne Servais <servais@adacore.com>2021-10-19 18:00:56 +0200
committerPierre-Marie de Rodat <derodat@adacore.com>2021-10-25 15:07:22 +0000
commited00b051d907c6f2383c906ee2354c7ba7488dff (patch)
tree03a01f06eabff72ca13c01c2f83e17a88bba9ac2 /gcc/ada/errout.ads
parent83e6be717c5bc9817c1a344627929642547e104f (diff)
downloadgcc-ed00b051d907c6f2383c906ee2354c7ba7488dff.zip
gcc-ed00b051d907c6f2383c906ee2354c7ba7488dff.tar.gz
gcc-ed00b051d907c6f2383c906ee2354c7ba7488dff.tar.bz2
[Ada] Change format of the ?? warning insertion sequence
gcc/ada/ * errout.adb (Skip_Msg_Insertion_Warning): Adapt and format as Erroutc.Prescan_Message.Parse_Message_Class. (Warn_Insertion): Adapt to new format. * errout.ads: Update documentation. * erroutc.adb (Get_Warning_Tag): Adapt to new format. (Prescan_Message): Introduce Parse_Message_Class function. (Validate_Specific_Warnings): Update ?W? to ?.w?. * erroutc.ads: Update type and documentation. * checks.adb (Validity_Check_Range): Update ?X? to ?.x?. * exp_ch11.adb (Possible_Local_Raise): Update ?X? to ?.x?. (Warn_If_No_Local_Raise): Likewise. (Warn_If_No_Propagation): Likewise. (Warn_No_Exception_Propagation_Active): Likewise. * exp_ch4.adb (Expand_N_Allocator): Attach warning message to -gnatw_a. * exp_prag.adb (Expand_Pragma_Check): Update ?A? to ?.a?. * exp_util.adb (Activate_Atomic_Synchronization): Update ?N? to ?.n?. (Add_Invariant_Check): Update ?L? to ?.l?. * freeze.adb (Check_Suspicious_Modulus): Update ?M? to ?.m?. (Freeze_Entity): Update ?T? to ?.t?, ?Z? to ?.z?. * par-util.adb (Warn_If_Standard_Redefinition): Update ?K? to ?.k?. * sem_attr.adb (Min_Max): Update ?U? to ?.u?. * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order): Update ?V? to ?.v?. (Adjust_Record_For_Reverse_Bit_Order_Ada_95): Update ?V? to ?.v?. (Component_Size_Case): Update ?S? to ?.s?. (Analyze_Record_Representation_Clause): Update ?S? to ?.s? and ?C? to ?.c?. (Add_Call): Update ?L? to ?.l?. (Component_Order_Check): Attach warning message to -gnatw_r. (Check_Component_List): Update ?H? to ?.h?. (Set_Biased): Update ?B? to ?.b?. * sem_ch3.adb (Modular_Type_Declaration): Update ?M? to ?.m?. * sem_ch4.adb (Analyze_Mod): Update ?M? to ?.m?. (Analyze_Quantified_Expression): Update ?T? to ?.t?. * sem_ch6.adb (Check_Conformance): Attach warning message to -gnatw_p. (List_Inherited_Pre_Post_Aspects): Update ?L? to ?.l?. * sem_ch7.adb (Unit_Requires_Body_Info): Update ?Y? to ?.y?. * sem_ch8.adb (Analyze_Object_Renaming): Update ?R? to ?.r?. * sem_prag.adb (Validate_Compile_Time_Warning_Or_Error): Attach warning message to -gnatw_c. * sem_res.adb (Check_Argument_Order): Update ?P? to ?.p?. (Resolve_Comparison_Op): Update ?U? to ?.u?. (Resolve_Range): Update ?U? to ?.u?. (Resolve_Short_Circuit): Update ?A? to ?.a?. (Resolve_Unary_Op): Update ?M? to ?.m?. * sem_util.adb (Check_Result_And_Post_State): Update ?T? to ?.t?. * sem_warn.adb (Output_Unused_Warnings_Off_Warnings): Update ?W? to ?.w?. * warnsw.ads: Update documentation for -gnatw_c.
Diffstat (limited to 'gcc/ada/errout.ads')
-rw-r--r--gcc/ada/errout.ads43
1 files changed, 19 insertions, 24 deletions
diff --git a/gcc/ada/errout.ads b/gcc/ada/errout.ads
index 9b2e08d..60b1b4f 100644
--- a/gcc/ada/errout.ads
+++ b/gcc/ada/errout.ads
@@ -60,13 +60,13 @@ package Errout is
-- Exception raised if Raise_Exception_On_Error is true
Warning_Doc_Switch : Boolean renames Err_Vars.Warning_Doc_Switch;
- -- If this is set True, then the ??/?*?/?$?/?x?/?X? insertion sequences in
- -- error messages generate appropriate tags for the output error messages.
- -- If this switch is False, then these sequences are still recognized (for
- -- the purposes of implementing the pattern matching in pragmas Warnings
- -- (Off,..) and Warning_As_Pragma(...) but do not result in adding the
- -- error message tag. The -gnatw.d switch sets this flag True, -gnatw.D
- -- sets this flag False.
+ -- If this is set True, then the ??/?*?/?$?/?x?/?.x?/?_x? insertion
+ -- sequences in error messages generate appropriate tags for the output
+ -- error messages. If this switch is False, then these sequences are still
+ -- recognized (for the purposes of implementing the pattern matching in
+ -- pragmas Warnings (Off,..) and Warning_As_Pragma(...) but do not result
+ -- in adding the error message tag. The -gnatw.d switch sets this flag
+ -- True, -gnatw.D sets this flag False.
Current_Node : Node_Id := Empty;
-- Used by Error_Msg as a default Node_Id.
@@ -302,28 +302,23 @@ package Errout is
-- clear that the continuation is part of a warning message, but it is
-- not necessary to go through any computational effort to include it.
--
- -- Note: this usage is obsolete, use ?? ?*? ?$? ?x? ?X? to specify
- -- the string to be added when Warn_Doc_Switch is set to True. If this
- -- switch is True, then for simple ? messages it has no effect. This
- -- simple form is to ease transition and may be removed later except
- -- for GNATprove-specific messages (info and warnings) which are not
- -- subject to the same GNAT warning switches.
+ -- Note: this usage is obsolete, use ?? ?*? ?$? ?x? ?.x? ?_x? to
+ -- specify the string to be added when Warn_Doc_Switch is set to True.
+ -- If this switch is True, then for simple ? messages it has no effect.
+ -- This simple form is to ease transition and may be removed later
+ -- except for GNATprove-specific messages (info and warnings) which are
+ -- not subject to the same GNAT warning switches.
-- Insertion character ?? (Two question marks: default warning)
-- Like ?, but if the flag Warn_Doc_Switch is True, adds the string
-- "[enabled by default]" at the end of the warning message. For
-- continuations, use this in each continuation message.
- -- Insertion character ?x? (warning with switch)
+ -- Insertion character ?x? ?.x? ?_x? (warning with switch)
-- Like ?, but if the flag Warn_Doc_Switch is True, adds the string
- -- "[-gnatwx]" at the end of the warning message. x is a lower case
- -- letter. For continuations, use this on each continuation message.
-
- -- Insertion character ?X? (warning with dot switch)
- -- Like ?, but if the flag Warn_Doc_Switch is True, adds the string
- -- "[-gnatw.x]" at the end of the warning message. X is an upper case
- -- letter corresponding to the lower case letter x in the message.
- -- For continuations, use this on each continuation message.
+ -- "[-gnatwx]", "[-gnatw.x]", or "[-gnatw_x]", at the end of the
+ -- warning message. x must be lower case. For continuations, use this
+ -- on each continuation message.
-- Insertion character ?*? (restriction warning)
-- Like ?, but if the flag Warn_Doc_Switch is True, adds the string
@@ -339,8 +334,8 @@ package Errout is
-- Insertion character < (Less Than: conditional warning message)
-- The character < appearing anywhere in a message is used for a
-- conditional error message. If Error_Msg_Warn is True, then the
- -- effect is the same as ? described above, and in particular << <X<
- -- <x< <$< <*< have the effect of ?? ?X? ?x? ?$? ?*? respectively. If
+ -- effect is the same as ? described above, and in particular << <x<
+ -- <$< <*< have the effect of ?? ?x? ?$? ?*? respectively. If
-- Error_Msg_Warn is False, then the < << or <X< sequence is ignored
-- and the message is treated as a error rather than a warning.