Commit f9673bb0 by Arnaud Charlet

[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
parent da20aa43
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> 2010-10-26 Robert Dewar <dewar@adacore.com>
* sem_res.adb, xsinfo.adb: Minor reformatting. * sem_res.adb, xsinfo.adb: Minor reformatting.
......
...@@ -41,10 +41,10 @@ ...@@ -41,10 +41,10 @@
with Hostparm; use Hostparm; with Hostparm; use Hostparm;
with Types; use Types; with Types; use Types;
with System.WCh_Con; use System.WCh_Con;
pragma Warnings (Off); pragma Warnings (Off);
-- This package is used also by gnatcoll
with System.Strings; use System.Strings; with System.Strings; use System.Strings;
with System.WCh_Con; use System.WCh_Con;
pragma Warnings (On); pragma Warnings (On);
package Opt is package Opt is
...@@ -1360,11 +1360,12 @@ package Opt is ...@@ -1360,11 +1360,12 @@ package Opt is
-- including warnings on Ada 2012 obsolescent features used in Ada 2012 -- including warnings on Ada 2012 obsolescent features used in Ada 2012
-- mode. Set False by -gnatwY. -- mode. Set False by -gnatwY.
Warn_On_Parameter_Order : Boolean := False; Warn_On_All_Unread_Out_Parameters : Boolean := False;
-- GNAT -- GNAT
-- Set to True to generate warnings for cases where the argument list for -- Set to True to generate warnings in all cases where a variable is
-- a call is a sequence of identifiers that match the formal identifiers, -- modified by being passed as to an OUT formal, but the resulting value is
-- but are in the wrong order. -- never read. The default is that this warning is suppressed, except in
-- the case of
Warn_On_Assertion_Failure : Boolean := True; Warn_On_Assertion_Failure : Boolean := True;
-- GNAT -- GNAT
...@@ -1421,13 +1422,6 @@ package Opt is ...@@ -1421,13 +1422,6 @@ package Opt is
-- but only if there is only one out parameter for the procedure involved. -- but only if there is only one out parameter for the procedure involved.
-- The default is that this warning is suppressed. -- 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; Warn_On_No_Value_Assigned : Boolean := True;
-- GNAT -- GNAT
-- Set to True to generate warnings if no value is ever assigned to a -- Set to True to generate warnings if no value is ever assigned to a
...@@ -1449,6 +1443,11 @@ package Opt is ...@@ -1449,6 +1443,11 @@ package Opt is
-- use this to avoid turning it on by default when No_Exception_Propagation -- use this to avoid turning it on by default when No_Exception_Propagation
-- restriction is set and an exception handler is present. -- 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; Warn_On_Obsolescent_Feature : Boolean := False;
-- GNAT -- GNAT
-- Set to True to generate warnings on use of any feature in Annex or if a -- Set to True to generate warnings on use of any feature in Annex or if a
...@@ -1464,16 +1463,17 @@ package Opt is ...@@ -1464,16 +1463,17 @@ package Opt is
-- Set to True to generate warnings for cases where parentheses are missing -- Set to True to generate warnings for cases where parentheses are missing
-- and the usage is questionable, because the intent is unclear. -- 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; Warn_On_Redundant_Constructs : Boolean := False;
-- GNAT -- GNAT
-- Set to True to generate warnings for redundant constructs (e.g. useless -- Set to True to generate warnings for redundant constructs (e.g. useless
-- assignments/conversions). The default is that this warning is disabled. -- 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; Warn_On_Reverse_Bit_Order : Boolean := True;
-- GNAT -- GNAT
-- Set to True to generate warning (informational) messages for component -- Set to True to generate warning (informational) messages for component
......
...@@ -2342,8 +2342,7 @@ package body Sem_Ch6 is ...@@ -2342,8 +2342,7 @@ package body Sem_Ch6 is
-- No warnings for parameterized expressions -- No warnings for parameterized expressions
and then Nkind (Original_Node (Body_Id)) /= and then Nkind (Original_Node (N)) /= N_Parameterized_Expression
N_Parameterized_Expression
then then
Style.Body_With_No_Spec (N); Style.Body_With_No_Spec (N);
end if; end if;
...@@ -4679,10 +4678,10 @@ package body Sem_Ch6 is ...@@ -4679,10 +4678,10 @@ package body Sem_Ch6 is
-- through the attribute alias) -- through the attribute alias)
if (Is_Dispatching_Operation (Subp) 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 not Comes_From_Source (Overridden_Subp)
and then Find_Dispatching_Type (Overridden_Subp) and then Find_Dispatching_Type (Overridden_Subp) =
= Find_Dispatching_Type (Subp) Find_Dispatching_Type (Subp)
and then Present (Alias (Overridden_Subp)) and then Present (Alias (Overridden_Subp))
and then Comes_From_Source (Alias (Overridden_Subp)) and then Comes_From_Source (Alias (Overridden_Subp))
then then
...@@ -8167,8 +8166,8 @@ package body Sem_Ch6 is ...@@ -8167,8 +8166,8 @@ package body Sem_Ch6 is
if not (Comes_From_Source (E)) if not (Comes_From_Source (E))
and then Is_Dispatching_Operation (E) and then Is_Dispatching_Operation (E)
and then Find_Dispatching_Type (E) and then Find_Dispatching_Type (E) =
= Find_Dispatching_Type (S) Find_Dispatching_Type (S)
and then Present (Alias (E)) and then Present (Alias (E))
and then Comes_From_Source (Alias (E)) and then Comes_From_Source (Alias (E))
then then
...@@ -8204,8 +8203,7 @@ package body Sem_Ch6 is ...@@ -8204,8 +8203,7 @@ package body Sem_Ch6 is
if Is_Dispatching_Operation (E) then if Is_Dispatching_Operation (E) then
-- An overriding dispatching subprogram inherits the -- An overriding dispatching subprogram inherits the
-- convention of the overridden subprogram (by -- convention of the overridden subprogram (AI-117).
-- AI-117).
Set_Convention (S, Convention (E)); Set_Convention (S, Convention (E));
Check_Dispatching_Operation (S, E); Check_Dispatching_Operation (S, E);
......
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