Commit 878f708a by Robert Dewar Committed by Arnaud Charlet

sem_ch3.adb, [...]: Minor reformatting.

2010-10-26  Robert Dewar  <dewar@adacore.com>

	* sem_ch3.adb, sem_ch4.adb, sem_disp.adb, switch-c.adb: Minor
	reformatting.
	* gnat_ugn.texi: Document -gnateP switch.

From-SVN: r165953
parent ce09f8b3
2010-10-26 Robert Dewar <dewar@adacore.com> 2010-10-26 Robert Dewar <dewar@adacore.com>
* sem_ch3.adb, sem_ch4.adb, sem_disp.adb, switch-c.adb: Minor
reformatting.
* gnat_ugn.texi: Document -gnateP switch.
2010-10-26 Robert Dewar <dewar@adacore.com>
* opt.ads (Treat_Categorization_Errors_As_Warnings): New flag * opt.ads (Treat_Categorization_Errors_As_Warnings): New flag
* sem_cat.adb (Check_Categorization_Dependencies): * sem_cat.adb (Check_Categorization_Dependencies):
Use Check_Categorization_Dependencies Use Check_Categorization_Dependencies
......
...@@ -4144,6 +4144,14 @@ Specify a preprocessing data file ...@@ -4144,6 +4144,14 @@ Specify a preprocessing data file
@end ifclear @end ifclear
(@pxref{Integrated Preprocessing}). (@pxref{Integrated Preprocessing}).
@item -gnateP
@cindex @option{-gnateP} (@command{gcc})
Turn categorization dependency errors into warnings.
Ada requires that units that WITH one another have compatible categories, for
example a Pure unit cannto WITH a Preelaborate unit. If this switch is used,
these errors become warnings (which can be ignored, or suppressed in the usual
manner). This can be useful in some specialized circumstances such as the
temporary use of special test software.
@item -gnateS @item -gnateS
@cindex @option{-gnateS} (@command{gcc}) @cindex @option{-gnateS} (@command{gcc})
Generate SCO (Source Coverage Obligation) information in the ALI Generate SCO (Source Coverage Obligation) information in the ALI
......
...@@ -1588,8 +1588,8 @@ package body Sem_Ch3 is ...@@ -1588,8 +1588,8 @@ package body Sem_Ch3 is
Derived_Type => Tagged_Type, Derived_Type => Tagged_Type,
Parent_Type => Iface); Parent_Type => Iface);
Set_Alias (New_Subp, Prim); Set_Alias (New_Subp, Prim);
Set_Is_Abstract_Subprogram (New_Subp, Set_Is_Abstract_Subprogram
Is_Abstract_Subprogram (Prim)); (New_Subp, Is_Abstract_Subprogram (Prim));
end if; end if;
Derive_Subprogram Derive_Subprogram
......
...@@ -2155,9 +2155,7 @@ package body Sem_Ch4 is ...@@ -2155,9 +2155,7 @@ package body Sem_Ch4 is
P_T := Base_Type (Etype (P)); P_T := Base_Type (Etype (P));
if Is_Entity_Name (P) if Is_Entity_Name (P) and then Present (Entity (P)) then
and then Present (Entity (P))
then
U_N := Entity (P); U_N := Entity (P);
if Is_Type (U_N) then if Is_Type (U_N) then
......
...@@ -1818,7 +1818,7 @@ package body Sem_Disp is ...@@ -1818,7 +1818,7 @@ package body Sem_Disp is
end if; end if;
-- Check if E covers the interface primitive (includes case in -- Check if E covers the interface primitive (includes case in
-- which E is an inherited private primitive) -- which E is an inherited private primitive).
if Is_Interface_Conformant (Tagged_Type, Iface_Prim, E) then if Is_Interface_Conformant (Tagged_Type, Iface_Prim, E) then
return E; return E;
......
...@@ -567,7 +567,13 @@ package body Switch.C is ...@@ -567,7 +567,13 @@ package body Switch.C is
Set_GNAT_Mode_Warnings; Set_GNAT_Mode_Warnings;
Set_GNAT_Style_Check_Options; Set_GNAT_Style_Check_Options;
-- Other special modes set by -gnatg -- Suppress categorization errors. The run-time has several
-- instances of violations of the categorization errors (e.g.
-- Pure units withing Preelaborate units. These violations are
-- harmless in the cases where we intend them, and we suppress
-- the warnings with Warnings (Off). In cases where we do not
-- intend the violation, warnings are errors in -gnatg mode
-- anyway, so we will still get an error.
Treat_Categorization_Errors_As_Warnings := True; Treat_Categorization_Errors_As_Warnings := True;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment