+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.
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;
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 :=
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;
------------------------------
-- 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;