diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-10-26 14:35:17 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-10-26 14:35:17 +0200 |
commit | f9673bb07a907dc644420d95858531e3699394e2 (patch) | |
tree | 2a58aed56937af5c7e59f935c7834336b72e760d | |
parent | da20aa430cc918e7c0449f7756c02a5fb77939b0 (diff) | |
download | gcc-f9673bb07a907dc644420d95858531e3699394e2.zip gcc-f9673bb07a907dc644420d95858531e3699394e2.tar.gz gcc-f9673bb07a907dc644420d95858531e3699394e2.tar.bz2 |
[multiple changes]
2010-10-26 Geert Bosch <bosch@adacore.com>
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use the subprogram_body
node to determine wether the subprogram is a rewritten parameterized
expression.
2010-10-26 Robert Dewar <dewar@adacore.com>
* opt.ads: Minor code reorganization
Alphabetize Warning switches.
From-SVN: r165951
-rw-r--r-- | gcc/ada/ChangeLog | 11 | ||||
-rw-r--r-- | gcc/ada/opt.ads | 36 | ||||
-rw-r--r-- | gcc/ada/sem_ch6.adb | 16 |
3 files changed, 36 insertions, 27 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 73d550e..591d7e4 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,14 @@ +2010-10-26 Geert Bosch <bosch@adacore.com> + + * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use the subprogram_body + node to determine wether the subprogram is a rewritten parameterized + expression. + +2010-10-26 Robert Dewar <dewar@adacore.com> + + * opt.ads: Minor code reorganization + Alphabetize Warning switches. + 2010-10-26 Robert Dewar <dewar@adacore.com> * sem_res.adb, xsinfo.adb: Minor reformatting. diff --git a/gcc/ada/opt.ads b/gcc/ada/opt.ads index a011417..23cbd6c 100644 --- a/gcc/ada/opt.ads +++ b/gcc/ada/opt.ads @@ -41,10 +41,10 @@ with Hostparm; use Hostparm; with Types; use Types; +with System.WCh_Con; use System.WCh_Con; + pragma Warnings (Off); --- This package is used also by gnatcoll with System.Strings; use System.Strings; -with System.WCh_Con; use System.WCh_Con; pragma Warnings (On); package Opt is @@ -1360,11 +1360,12 @@ package Opt is -- including warnings on Ada 2012 obsolescent features used in Ada 2012 -- mode. Set False by -gnatwY. - Warn_On_Parameter_Order : Boolean := False; + Warn_On_All_Unread_Out_Parameters : Boolean := False; -- GNAT - -- Set to True to generate warnings for cases where the argument list for - -- a call is a sequence of identifiers that match the formal identifiers, - -- but are in the wrong order. + -- Set to True to generate warnings in all cases where a variable is + -- modified by being passed as to an OUT formal, but the resulting value is + -- never read. The default is that this warning is suppressed, except in + -- the case of Warn_On_Assertion_Failure : Boolean := True; -- GNAT @@ -1421,13 +1422,6 @@ package Opt is -- but only if there is only one out parameter for the procedure involved. -- The default is that this warning is suppressed. - Warn_On_All_Unread_Out_Parameters : Boolean := False; - -- GNAT - -- Set to True to generate warnings in all cases where a variable is - -- modified by being passed as to an OUT formal, but the resulting value is - -- never read. The default is that this warning is suppressed, except in - -- the case of - Warn_On_No_Value_Assigned : Boolean := True; -- GNAT -- Set to True to generate warnings if no value is ever assigned to a @@ -1449,6 +1443,11 @@ package Opt is -- use this to avoid turning it on by default when No_Exception_Propagation -- restriction is set and an exception handler is present. + Warn_On_Object_Renames_Function : Boolean := False; + -- GNAT + -- Set to True to generate warnings when a function result is renamed as + -- an object. The default is that this warning is disabled. + Warn_On_Obsolescent_Feature : Boolean := False; -- GNAT -- Set to True to generate warnings on use of any feature in Annex or if a @@ -1464,16 +1463,17 @@ package Opt is -- Set to True to generate warnings for cases where parentheses are missing -- and the usage is questionable, because the intent is unclear. + Warn_On_Parameter_Order : Boolean := False; + -- GNAT + -- Set to True to generate warnings for cases where the argument list for + -- a call is a sequence of identifiers that match the formal identifiers, + -- but are in the wrong order. + Warn_On_Redundant_Constructs : Boolean := False; -- GNAT -- Set to True to generate warnings for redundant constructs (e.g. useless -- assignments/conversions). The default is that this warning is disabled. - Warn_On_Object_Renames_Function : Boolean := False; - -- GNAT - -- Set to True to generate warnings when a function result is renamed as - -- an object. The default is that this warning is disabled. - Warn_On_Reverse_Bit_Order : Boolean := True; -- GNAT -- Set to True to generate warning (informational) messages for component diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb index 8abe3cd..a0de929 100644 --- a/gcc/ada/sem_ch6.adb +++ b/gcc/ada/sem_ch6.adb @@ -2342,8 +2342,7 @@ package body Sem_Ch6 is -- No warnings for parameterized expressions - and then Nkind (Original_Node (Body_Id)) /= - N_Parameterized_Expression + and then Nkind (Original_Node (N)) /= N_Parameterized_Expression then Style.Body_With_No_Spec (N); end if; @@ -4679,10 +4678,10 @@ package body Sem_Ch6 is -- through the attribute alias) if (Is_Dispatching_Operation (Subp) - or else Is_Dispatching_Operation (Overridden_Subp)) + or else Is_Dispatching_Operation (Overridden_Subp)) and then not Comes_From_Source (Overridden_Subp) - and then Find_Dispatching_Type (Overridden_Subp) - = Find_Dispatching_Type (Subp) + and then Find_Dispatching_Type (Overridden_Subp) = + Find_Dispatching_Type (Subp) and then Present (Alias (Overridden_Subp)) and then Comes_From_Source (Alias (Overridden_Subp)) then @@ -8167,8 +8166,8 @@ package body Sem_Ch6 is if not (Comes_From_Source (E)) and then Is_Dispatching_Operation (E) - and then Find_Dispatching_Type (E) - = Find_Dispatching_Type (S) + and then Find_Dispatching_Type (E) = + Find_Dispatching_Type (S) and then Present (Alias (E)) and then Comes_From_Source (Alias (E)) then @@ -8204,8 +8203,7 @@ package body Sem_Ch6 is if Is_Dispatching_Operation (E) then -- An overriding dispatching subprogram inherits the - -- convention of the overridden subprogram (by - -- AI-117). + -- convention of the overridden subprogram (AI-117). Set_Convention (S, Convention (E)); Check_Dispatching_Operation (S, E); |