diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-26 12:48:29 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-26 12:48:29 +0000 |
commit | c4c6319dbc7a6af7994e7aefcb97e312d3795278 (patch) | |
tree | 04b4fabf31c9b8095d2ae48547d47d1a5ebaa82b | |
parent | d2d3116b48bc67c781428ffde9be60ce5bcc5144 (diff) | |
download | gcc-c4c6319dbc7a6af7994e7aefcb97e312d3795278.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165953 138bc75d-0d04-0410-961f-82ee72b054a4
-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 07d35a44385..20a067cea7a 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 bc688383ab1..2e65144e433 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 33a5044a83b..3dde575c7aa 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 1cb54c468aa..829d0140acc 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 55330b99d09..d52e59f19ef 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 4e63e3177bb..a1919e9c726 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 |