aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/errutil.adb
diff options
context:
space:
mode:
authorRobert Dewar <dewar@adacore.com>2005-09-05 09:52:55 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2005-09-05 09:52:55 +0200
commit3711d64615812c04a47aecb0787136a57548f31b (patch)
treea2e43c3e03fc087f1f1ac33952d8eb14bc5d2009 /gcc/ada/errutil.adb
parent405e57adc0248985e4ef02e7b16a176c06a646e7 (diff)
downloadgcc-3711d64615812c04a47aecb0787136a57548f31b.zip
gcc-3711d64615812c04a47aecb0787136a57548f31b.tar.gz
gcc-3711d64615812c04a47aecb0787136a57548f31b.tar.bz2
errout.ads, errout.adb (Fix Error_Msg_F): Fix implementation to meet spec.
2005-09-01 Robert Dewar <dewar@adacore.com> * errout.ads, errout.adb (Fix Error_Msg_F): Fix implementation to meet spec. Implement new insertion char < (conditional warning) * errutil.adb, erroutc.adb: Implement new insertion char < (conditional warning). * sem_elab.adb, prj-dect.adb, erroutc.ads, err_vars.ads (Error_Msg_Warn): New variable for < insertion char. * prj-nmsc.adb: Implement new errout insertion char < (conditional warning). (Check_For_Source): Change value of Source_Id only after the current source has been dealt with. From-SVN: r103859
Diffstat (limited to 'gcc/ada/errutil.adb')
-rw-r--r--gcc/ada/errutil.adb42
1 files changed, 22 insertions, 20 deletions
diff --git a/gcc/ada/errutil.adb b/gcc/ada/errutil.adb
index fae34f4..e0a6864 100644
--- a/gcc/ada/errutil.adb
+++ b/gcc/ada/errutil.adb
@@ -44,7 +44,7 @@ package body Errutil is
-----------------------
procedure Error_Msg_AP (Msg : String);
- -- Output a message just after the previous token.
+ -- Output a message just after the previous token
procedure Output_Source_Line
(L : Physical_Line_Number;
@@ -184,12 +184,12 @@ package body Errutil is
return;
end if;
- -- Return without doing anything if message is killed and this
- -- is not the first error message. The philosophy is that if we
- -- get a weird error message and we already have had a message,
- -- then we hope the weird message is a junk cascaded message
+ -- Return without doing anything if message is killed and this is not
+ -- the first error message. The philosophy is that if we get a weird
+ -- error message and we already have had a message, then we hope the
+ -- weird message is a junk cascaded message
- -- Immediate return if warning message and warnings are suppressed
+ -- Immediate return if warning message and warnings are suppressed.
-- Note that style messages are not warnings for this purpose.
if Is_Warning_Msg and then Warnings_Suppressed (Sptr) then
@@ -246,20 +246,19 @@ package body Errutil is
and then Errors.Table (Prev_Msg).Sfile =
Errors.Table (Cur_Msg).Sfile
then
- -- Don't delete unconditional messages and at this stage,
- -- don't delete continuation lines (we attempted to delete
- -- those earlier if the parent message was deleted.
+ -- Don't delete unconditional messages and at this stage, don't
+ -- delete continuation lines (we attempted to delete those earlier
+ -- if the parent message was deleted.
if not Errors.Table (Cur_Msg).Uncond
and then not Continuation
then
- -- Don't delete if prev msg is warning and new msg is
- -- an error. This is because we don't want a real error
- -- masked by a warning. In all other cases (that is parse
- -- errors for the same line that are not unconditional)
- -- we do delete the message. This helps to avoid
- -- junk extra messages from cascaded parsing errors
+ -- Don't delete if prev msg is warning and new msg is an error.
+ -- This is because we don't want a real error masked by a warning.
+ -- In all other cases (that is parse errors for the same line that
+ -- are not unconditional) we do delete the message. This helps to
+ -- avoid junk extra messages from cascaded parsing errors
if not (Errors.Table (Prev_Msg).Warn
or
@@ -269,8 +268,8 @@ package body Errutil is
or
Errors.Table (Cur_Msg).Style)
then
- -- All tests passed, delete the message by simply
- -- returning without any further processing.
+ -- All tests passed, delete the message by simply returning
+ -- without any further processing.
if not Continuation then
Last_Killed := True;
@@ -438,7 +437,6 @@ package body Errutil is
Write_Eol;
end if;
-
end loop;
-- Then output errors, if any, for subsidiary units
@@ -564,7 +562,6 @@ package body Errutil is
Total_Errors_Detected := Total_Errors_Detected + Warnings_Detected;
Warnings_Detected := 0;
end if;
-
end Finalize;
----------------
@@ -585,7 +582,6 @@ package body Errutil is
-- an initial dummy entry covering all possible source locations.
Warnings.Init;
-
end Initialize;
------------------------
@@ -682,6 +678,7 @@ package body Errutil is
Set_Msg_Insertion_Name;
elsif C = '$' then
+
-- '$' is ignored
null;
@@ -690,6 +687,7 @@ package body Errutil is
Set_Msg_Insertion_File_Name;
elsif C = '}' then
+
-- '}' is ignored
null;
@@ -698,6 +696,7 @@ package body Errutil is
Set_Msg_Insertion_Reserved_Name;
elsif C = '&' then
+
-- '&' is ignored
null;
@@ -724,6 +723,9 @@ package body Errutil is
elsif C = '?' then
null;
+ elsif C = '<' then
+ null;
+
elsif C = '|' then
null;