aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Dewar <dewar@adacore.com>2015-02-05 14:31:10 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2015-02-05 15:31:10 +0100
commitee7c8ffd33b0919d52b413c4eb816062f2e8cbc5 (patch)
treee4eb0f56500b2cba4f989892945267e5539059ff
parent4ed8ef2667fcedbdc04d6ef6c0a2df702131fccc (diff)
downloadgcc-ee7c8ffd33b0919d52b413c4eb816062f2e8cbc5.zip
gcc-ee7c8ffd33b0919d52b413c4eb816062f2e8cbc5.tar.gz
gcc-ee7c8ffd33b0919d52b413c4eb816062f2e8cbc5.tar.bz2
errout.adb (Error_Msg_Internal): For non-serious error set Fatal_Error to Ignored.
2015-02-05 Robert Dewar <dewar@adacore.com> * errout.adb (Error_Msg_Internal): For non-serious error set Fatal_Error to Ignored. * lib-load.adb (Load_Unit): Minor comment updates. * sem_ch10.adb (Analyze_With_Clause): Propagate Fatal_Error setting from with'ed unit to with'ing unit. * sem_prag.adb (Analyze_Pragma, case Warnings): Document handling of ambiguity. From-SVN: r220450
-rw-r--r--gcc/ada/ChangeLog10
-rw-r--r--gcc/ada/errout.adb11
-rw-r--r--gcc/ada/lib-load.adb10
-rw-r--r--gcc/ada/sem_ch10.adb23
-rw-r--r--gcc/ada/sem_prag.adb5
5 files changed, 58 insertions, 1 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 69fa5f6..6da97c7 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,13 @@
+2015-02-05 Robert Dewar <dewar@adacore.com>
+
+ * errout.adb (Error_Msg_Internal): For non-serious error set
+ Fatal_Error to Ignored.
+ * lib-load.adb (Load_Unit): Minor comment updates.
+ * sem_ch10.adb (Analyze_With_Clause): Propagate Fatal_Error
+ setting from with'ed unit to with'ing unit.
+ * sem_prag.adb (Analyze_Pragma, case Warnings): Document handling
+ of ambiguity.
+
2015-02-05 Yannick Moy <moy@adacore.com>
* sem_prag.adb, par-prag.adb: Minor code clean up.
diff --git a/gcc/ada/errout.adb b/gcc/ada/errout.adb
index df0fa96..86ea13f 100644
--- a/gcc/ada/errout.adb
+++ b/gcc/ada/errout.adb
@@ -1164,6 +1164,17 @@ package body Errout is
if Errors.Table (Cur_Msg).Serious then
Serious_Errors_Detected := Serious_Errors_Detected + 1;
Handle_Serious_Error;
+
+ -- If not serious error, set Fatal_Error to indicate ignored error
+
+ else
+ declare
+ U : constant Unit_Number_Type := Get_Source_Unit (Sptr);
+ begin
+ if Fatal_Error (U) = None then
+ Set_Fatal_Error (U, Error_Ignored);
+ end if;
+ end;
end if;
end if;
diff --git a/gcc/ada/lib-load.adb b/gcc/ada/lib-load.adb
index fc52f84..aef313f 100644
--- a/gcc/ada/lib-load.adb
+++ b/gcc/ada/lib-load.adb
@@ -740,16 +740,24 @@ package body Lib.Load is
goto Done;
end if;
- -- If loaded unit had a fatal error, then caller inherits it
+ -- If loaded unit had a fatal error, then caller inherits setting
if Present (Error_Node) then
case Units.Table (Unum).Fatal_Error is
+
+ -- Nothing to do if with'ed unit had no error
+
when None =>
null;
+ -- If with'ed unit had a detected fatal error, propagate it
+
when Error_Detected =>
Units.Table (Calling_Unit).Fatal_Error := Error_Detected;
+ -- If with'ed unit had an ignored error, then propagate it
+ -- but do not overide an existring setting.
+
when Error_Ignored =>
if Units.Table (Calling_Unit).Fatal_Error = None then
Units.Table (Calling_Unit).Fatal_Error :=
diff --git a/gcc/ada/sem_ch10.adb b/gcc/ada/sem_ch10.adb
index d7df7eb..31542fe 100644
--- a/gcc/ada/sem_ch10.adb
+++ b/gcc/ada/sem_ch10.adb
@@ -2821,6 +2821,29 @@ package body Sem_Ch10 is
if Private_Present (N) then
Set_Is_Immediately_Visible (E_Name, False);
end if;
+
+ -- Propagate Fatal_Error setting from with'ed unit to current unit
+
+ case Fatal_Error (Get_Source_Unit (Library_Unit (N))) is
+
+ -- Nothing to do if with'ed unit had no error
+
+ when None =>
+ null;
+
+ -- If with'ed unit had a detected fatal error, propagate it
+
+ when Error_Detected =>
+ Set_Fatal_Error (Current_Sem_Unit, Error_Detected);
+
+ -- If with'ed unit had an ignored error, then propagate it
+ -- but do not overide an existring setting.
+
+ when Error_Ignored =>
+ if Fatal_Error (Current_Sem_Unit) = None then
+ Set_Fatal_Error (Current_Sem_Unit, Error_Ignored);
+ end if;
+ end case;
end Analyze_With_Clause;
------------------------------
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb
index 232d53d..01fe51e 100644
--- a/gcc/ada/sem_prag.adb
+++ b/gcc/ada/sem_prag.adb
@@ -21340,6 +21340,11 @@ package body Sem_Prag is
-- always considered to be a tool name, even if there is a string
-- variable of that name.
+ -- Note if the second argument of DETAILS is a local_NAME then the
+ -- second form is always understood. If the intention is to use
+ -- the fourth form, then you can write NAME & "" to force the
+ -- intepretation as a static_string_EXPRESSION.
+
when Pragma_Warnings => Warnings : declare
Reason : String_Id;