Commit fc53fe76 by Arnaud Charlet

[multiple changes]

2009-07-27  Sergey Rybin  <rybin@adacore.com>

	* gnat_ugn.texi: gnatcheck Unconstrained_Array_Returns rule: Add to the
	rule definition the paragraph that explains that generic functions and
	functions from generic packages are not checked.

2009-07-27  Gary Dismukes  <dismukes@adacore.com>

	* sem_ch6.adb (New_Overloaded_Entity): Add test for an expanded null
	procedure when determining whether to set the Overridden_Operation
	field of a subprogram overriding an inherited subprogram.
	
2009-07-27  Robert Dewar  <dewar@adacore.com>

	* a-except.adb, a-except-2005.ads: Minor reformatting

From-SVN: r150120
parent cff7cd9b
2009-07-27 Sergey Rybin <rybin@adacore.com>
* gnat_ugn.texi: gnatcheck Unconstrained_Array_Returns rule: Add to the
rule definition the paragraph that explains that generic functions and
functions from generic packages are not checked.
2009-07-27 Gary Dismukes <dismukes@adacore.com>
* sem_ch6.adb (New_Overloaded_Entity): Add test for an expanded null
procedure when determining whether to set the Overridden_Operation
field of a subprogram overriding an inherited subprogram.
2009-07-27 Robert Dewar <dewar@adacore.com>
* a-except.adb, a-except-2005.ads: Minor reformatting
2009-07-27 Robert Dewar <dewar@adacore.com>
* sem_util.adb, sem_util.ads (Kill_Current_Values): Reset Is_Known_Valid
......
......@@ -115,7 +115,9 @@ package Ada.Exceptions is
-- 0xyyyyyyyy 0xyyyyyyyy ...
--
-- The lines are separated by a ASCII.LF character
-- The nnnn is the partition Id given as decimal digits.
--
-- The nnnn is the partition Id given as decimal digits
--
-- The 0x... line represents traceback program counter locations,
-- in order with the first one being the exception location.
......@@ -184,13 +186,13 @@ private
pragma Export
(Ada, Current_Target_Exception,
"__gnat_current_target_exception");
-- This routine should return the current raised exception on targets
-- which have built-in exception handling such as the Java Virtual
-- Machine. For other targets this routine is simply ignored. Currently,
-- only JGNAT uses this. See 4jexcept.ads for details. The pragma Export
-- allows this routine to be accessed elsewhere in the run-time, even
-- though it is in the private part of this package (it is not allowed
-- to be in the visible part, since this is set by the reference manual).
-- This routine should return the current raised exception on targets which
-- have built-in exception handling such as the Java Virtual Machine. For
-- other targets this routine is simply ignored. Currently, only JGNAT
-- uses this. See 4jexcept.ads for details. The pragma Export allows this
-- routine to be accessed elsewhere in the run-time, even though it is in
-- the private part of this package (it is not allowed to be in the visible
-- part, since this is set by the reference manual).
function Exception_Name_Simple (X : Exception_Occurrence) return String;
-- Like Exception_Name, but returns the simple non-qualified name of the
......@@ -230,8 +232,8 @@ private
procedure Raise_From_Controlled_Operation
(X : Ada.Exceptions.Exception_Occurrence);
pragma No_Return (Raise_From_Controlled_Operation);
-- Raise Program_Error, providing information about X (an exception
-- raised during a controlled operation) in the exception message.
-- Raise Program_Error, providing information about X (an exception raised
-- during a controlled operation) in the exception message.
procedure Reraise_Occurrence_Always (X : Exception_Occurrence);
pragma No_Return (Reraise_Occurrence_Always);
......@@ -244,8 +246,8 @@ private
pragma No_Return (Reraise_Occurrence_No_Defer);
-- Exactly like Reraise_Occurrence, except that abort is not deferred
-- before the call and the parameter X is known not to be the null
-- occurrence. This is used in generated code when it is known that
-- abort is already deferred.
-- occurrence. This is used in generated code when it is known that abort
-- is already deferred.
-----------------------
-- Polling Interface --
......@@ -287,6 +289,7 @@ private
type Exception_Occurrence is record
Id : Exception_Id;
-- Exception_Identity for this exception occurrence
--
-- WARNING System.System.Finalization_Implementation.Finalize_List
-- relies on the fact that this field is always first in the exception
-- occurrence
......
......@@ -22690,9 +22690,14 @@ This rule has no parameters.
Flag each function returning an unconstrained array. Function declarations,
function bodies (and body stubs) having no separate specifications,
and generic function instantiations are checked.
Generic function declarations, function calls and function renamings are
Function calls and function renamings are
not checked.
Generic function declarations, and function declarations in generic
packages are not checked, instead this rule checks the results of
generic instantiations (that is, expanded specification and expanded
body corresponding to an instantiation).
This rule has no parameters.
@node Universal_Ranges
......@@ -7678,10 +7678,22 @@ package body Sem_Ch6 is
Set_Is_Overriding_Operation (S);
Check_Overriding_Indicator (S, E, Is_Primitive => True);
-- Indicate that S overrides the operation from which
-- E is inherited.
if Comes_From_Source (S) then
-- If S is a user-defined subprogram or a null procedure
-- expanded to override an inherited null procedure, then
-- indicate that E overrides the operation from which S
-- is inherited. It seems odd that Overridden_Operation
-- isn't set in all cases where Is_Overriding_Operation
-- is true, but doing so causes infinite loops in the
-- compiler for implicit overriding subprograms. ???
if Comes_From_Source (S)
or else
(Present (Parent (S))
and then
Nkind (Parent (S)) = N_Procedure_Specification
and then
Null_Present (Parent (S)))
then
if Present (Alias (E)) then
Set_Overridden_Operation (S, Alias (E));
else
......
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