diff options
-rw-r--r-- | gcc/ada/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/ada/gnat_ugn.texi | 8 | ||||
-rw-r--r-- | gcc/ada/sem_ch3.adb | 4 | ||||
-rw-r--r-- | gcc/ada/sem_ch4.adb | 4 | ||||
-rw-r--r-- | gcc/ada/sem_disp.adb | 2 | ||||
-rw-r--r-- | gcc/ada/switch-c.adb | 12 |
6 files changed, 27 insertions, 9 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 07d35a4..20a067c 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,5 +1,11 @@ 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 * sem_cat.adb (Check_Categorization_Dependencies): Use Check_Categorization_Dependencies diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi index bc68838..2e65144 100644 --- a/gcc/ada/gnat_ugn.texi +++ b/gcc/ada/gnat_ugn.texi @@ -4144,6 +4144,14 @@ Specify a preprocessing data file @end ifclear (@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 @cindex @option{-gnateS} (@command{gcc}) Generate SCO (Source Coverage Obligation) information in the ALI diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index 33a5044..3dde575 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -1588,8 +1588,8 @@ package body Sem_Ch3 is Derived_Type => Tagged_Type, Parent_Type => Iface); Set_Alias (New_Subp, Prim); - Set_Is_Abstract_Subprogram (New_Subp, - Is_Abstract_Subprogram (Prim)); + Set_Is_Abstract_Subprogram + (New_Subp, Is_Abstract_Subprogram (Prim)); end if; Derive_Subprogram diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb index 1cb54c4..829d014 100644 --- a/gcc/ada/sem_ch4.adb +++ b/gcc/ada/sem_ch4.adb @@ -2155,9 +2155,7 @@ package body Sem_Ch4 is P_T := Base_Type (Etype (P)); - if Is_Entity_Name (P) - and then Present (Entity (P)) - then + if Is_Entity_Name (P) and then Present (Entity (P)) then U_N := Entity (P); if Is_Type (U_N) then diff --git a/gcc/ada/sem_disp.adb b/gcc/ada/sem_disp.adb index 55330b9..d52e59f 100644 --- a/gcc/ada/sem_disp.adb +++ b/gcc/ada/sem_disp.adb @@ -1818,7 +1818,7 @@ package body Sem_Disp is end if; -- 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 return E; diff --git a/gcc/ada/switch-c.adb b/gcc/ada/switch-c.adb index 4e63e31..a1919e9 100644 --- a/gcc/ada/switch-c.adb +++ b/gcc/ada/switch-c.adb @@ -567,7 +567,13 @@ package body Switch.C is Set_GNAT_Mode_Warnings; 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; @@ -929,8 +935,8 @@ package body Switch.C is when 'X' => Ptr := Ptr + 1; - Extensions_Allowed := True; - Ada_Version := Ada_Version_Type'Last; + Extensions_Allowed := True; + Ada_Version := Ada_Version_Type'Last; Ada_Version_Explicit := Ada_Version_Type'Last; -- Processing for y switch |