summaryrefslogtreecommitdiff
path: root/gcc/ada/errout.ads
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-06-11 10:52:35 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-06-11 10:52:35 +0000
commit7c1622f9a4113017ac37b0acda6786b6a29b3b75 (patch)
tree8164bb2479d90ef5d1bb21f44ae01230e59b55a6 /gcc/ada/errout.ads
parent140d20770a6f3ce67519b88a6db1026d57831dd6 (diff)
downloadgcc-7c1622f9a4113017ac37b0acda6786b6a29b3b75.tar.gz
2014-06-11 Geert Bosch <bosch@adacore.com>
* s-exctab.adb: avoid race conditions in exception registration. 2014-06-11 Robert Dewar <dewar@adacore.com> * errout.adb (Warn_Insertion): New function. (Error_Msg): Use Warn_Insertion and Prescan_Message. (Error_Msg_Internal): Set Info field of error object. (Error_Msg_NEL): Use Prescan_Message. (Set_Msg_Text): Don't store info: at start of message. (Skip_Msg_Insertion_Warning): New name for Set_Msg_Insertion_Warning. (Skip_Msg_Insertion_Warning): Now just skips warning insertion. * errout.ads: Document new ?$? and >$> insertion sequences Document use of "(style)" and "info: " * erroutc.adb (dmsg): Print several missing fields (Get_Warning_Tag): Handle -gnatel case (?$?) (Output_Msg_Text): Deal with new tagging of info messages * erroutc.ads: Is_Info_Msg: New global (Error_Msg_Object): Add field Info (Prescan_Message): New procedure, this procedure replaces the old Test_Style_Warning_Serious_Unconditional_Msg * errutil.adb, exp_util.adb, par-ch7.adb, sem_ch13.adb, sem_ch7.adb, sem_elab.adb: Follow new rules for info message (info belongs only at the start of a message, and only in the first message, not in any of the continuations). * gnat_ugn.texi: Document full set of warning tags. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211447 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/errout.ads')
-rw-r--r--gcc/ada/errout.ads38
1 files changed, 29 insertions, 9 deletions
diff --git a/gcc/ada/errout.ads b/gcc/ada/errout.ads
index a42d3dba75c..45234a4dc9b 100644
--- a/gcc/ada/errout.ads
+++ b/gcc/ada/errout.ads
@@ -60,12 +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? 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 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? 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.
-----------------------------------
-- Suppression of Error Messages --
@@ -283,7 +284,7 @@ package Errout is
-- messages, and the usual style is to include it, since it makes it
-- clear that the continuation is part of a warning message.
--
- -- Note: this usage is obsolete, use ?? ?*? ?x? ?X? instead to specify
+ -- 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 will be removed later.
@@ -309,11 +310,17 @@ package Errout is
-- "[restriction warning]" at the end of the warning message. For
-- continuations, use this on each continuation message.
+ -- Insertion character ?$? (elaboration information messages)
+ -- Like ?, but if the flag Warn_Doc_Switch is True, adds the string
+ -- "[-gnatel]" at the end of the info message. This is used for the
+ -- messages generated by the switch -gnatel. For continuations, use
+ -- this on each continuation message.
+
-- 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< and <*< have the effect of ?? ?X? and ?*? respectively. If
+ -- effect is the same as ? described above, and in particular << <X<
+ -- <x< <$< <*< have the effect of ?? ?X? ?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.
@@ -392,6 +399,19 @@ package Errout is
-- This is like [ except that the insertion messages say may/might,
-- instead of will/would.
+ -- Insertion sequence "(style)" (style message)
+ -- This appears only at the start of the message (and not any of its
+ -- continuations, if any), and indicates that the message is a style
+ -- message. Style messages are also considered to be warnings, but
+ -- they do not get a tag.
+
+ -- Insertion sequence "info: " (information message)
+ -- This appears only at the start of the message (and not any of its
+ -- continuations, if any), and indicates that the message is an info
+ -- message. The message will be output with this prefix, and if there
+ -- are continuations that are not printed using the -gnatj switch they
+ -- will also have this prefix.
+
----------------------------------------
-- Specialization of Messages for VMS --
----------------------------------------