[multiple changes]
2010-10-11 Robert Dewar <dewar@adacore.com> * a-textio.adb: Minor reformatting 2010-10-11 Robert Dewar <dewar@adacore.com> * a-suesen.ads, a-suenst.ads, a-suesen.adb, a-suenst.adb, a-suewse.adb, a-suewst.adb, a-suewse.ads, a-suewst.ads, a-suezse.ads, a-suezst.ads, a-suezse.adb, a-suezst.adb: New name for string encoding packages. * impunit.adb: New names for string encoding units * Makefile.rtl: New names for string encoding units * rtsfind.ads: Minor code reorganization. 2010-10-11 Ed Schonberg <schonberg@adacore.com> * exp_ch5.adb: Code clean up. 2010-10-11 Ed Schonberg <schonberg@adacore.com> * sem_ch6.adb (Check_Limited_Return): Specialize warning on limited returns when in a generic context. (Analyze_Function_Return): ditto. From-SVN: r165276
This commit is contained in:
parent
0144fd18d7
commit
9694c03951
|
@ -1,3 +1,29 @@
|
||||||
|
2010-10-11 Robert Dewar <dewar@adacore.com>
|
||||||
|
|
||||||
|
* a-textio.adb: Minor reformatting
|
||||||
|
|
||||||
|
2010-10-11 Robert Dewar <dewar@adacore.com>
|
||||||
|
|
||||||
|
* a-suesen.ads, a-suenst.ads,
|
||||||
|
a-suesen.adb, a-suenst.adb,
|
||||||
|
a-suewse.adb, a-suewst.adb,
|
||||||
|
a-suewse.ads, a-suewst.ads,
|
||||||
|
a-suezse.ads, a-suezst.ads,
|
||||||
|
a-suezse.adb, a-suezst.adb: New name for string encoding packages.
|
||||||
|
* impunit.adb: New names for string encoding units
|
||||||
|
* Makefile.rtl: New names for string encoding units
|
||||||
|
* rtsfind.ads: Minor code reorganization.
|
||||||
|
|
||||||
|
2010-10-11 Ed Schonberg <schonberg@adacore.com>
|
||||||
|
|
||||||
|
* exp_ch5.adb: Code clean up.
|
||||||
|
|
||||||
|
2010-10-11 Ed Schonberg <schonberg@adacore.com>
|
||||||
|
|
||||||
|
* sem_ch6.adb (Check_Limited_Return): Specialize warning on limited
|
||||||
|
returns when in a generic context.
|
||||||
|
(Analyze_Function_Return): ditto.
|
||||||
|
|
||||||
2010-10-11 Robert Dewar <dewar@adacore.com>
|
2010-10-11 Robert Dewar <dewar@adacore.com>
|
||||||
|
|
||||||
* s-multip.ads: Fix header.
|
* s-multip.ads: Fix header.
|
||||||
|
|
|
@ -227,9 +227,9 @@ GNATRTL_NONTASKING_OBJS= \
|
||||||
a-stzsup$(objext) \
|
a-stzsup$(objext) \
|
||||||
a-stzunb$(objext) \
|
a-stzunb$(objext) \
|
||||||
a-suenco$(objext) \
|
a-suenco$(objext) \
|
||||||
a-suesen$(objext) \
|
a-suenst$(objext) \
|
||||||
a-suewse$(objext) \
|
a-suewst$(objext) \
|
||||||
a-suezse$(objext) \
|
a-suezst$(objext) \
|
||||||
a-suteio$(objext) \
|
a-suteio$(objext) \
|
||||||
a-swbwha$(objext) \
|
a-swbwha$(objext) \
|
||||||
a-swfwha$(objext) \
|
a-swfwha$(objext) \
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
-- --
|
-- --
|
||||||
-- GNAT RUN-TIME COMPONENTS --
|
-- GNAT RUN-TIME COMPONENTS --
|
||||||
-- --
|
-- --
|
||||||
-- ADA.STRINGS.UTF_ENCODING.STRING_ENCODING --
|
-- ADA.STRINGS.UTF_ENCODING.STRINGS --
|
||||||
-- --
|
-- --
|
||||||
-- B o d y --
|
-- B o d y --
|
||||||
-- --
|
-- --
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
-- --
|
-- --
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
package body Ada.Strings.UTF_Encoding.String_Encoding is
|
package body Ada.Strings.UTF_Encoding.Strings is
|
||||||
use Interfaces;
|
use Interfaces;
|
||||||
|
|
||||||
------------
|
------------
|
||||||
|
@ -338,4 +338,4 @@ package body Ada.Strings.UTF_Encoding.String_Encoding is
|
||||||
return Result;
|
return Result;
|
||||||
end Encode;
|
end Encode;
|
||||||
|
|
||||||
end Ada.Strings.UTF_Encoding.String_Encoding;
|
end Ada.Strings.UTF_Encoding.Strings;
|
|
@ -2,7 +2,7 @@
|
||||||
-- --
|
-- --
|
||||||
-- GNAT RUN-TIME COMPONENTS --
|
-- GNAT RUN-TIME COMPONENTS --
|
||||||
-- --
|
-- --
|
||||||
-- ADA.STRINGS.UTF_ENCODING.STRING_ENCODING --
|
-- ADA.STRINGS.UTF_ENCODING.STRINGS --
|
||||||
-- --
|
-- --
|
||||||
-- S p e c --
|
-- S p e c --
|
||||||
-- --
|
-- --
|
||||||
|
@ -17,8 +17,8 @@
|
||||||
-- and decoding String values using UTF encodings. Note: this package is
|
-- and decoding String values using UTF encodings. Note: this package is
|
||||||
-- consistent with Ada 95, and may be included in Ada 95 implementations.
|
-- consistent with Ada 95, and may be included in Ada 95 implementations.
|
||||||
|
|
||||||
package Ada.Strings.UTF_Encoding.String_Encoding is
|
package Ada.Strings.UTF_Encoding.Strings is
|
||||||
pragma Pure (String_Encoding);
|
pragma Pure (Strings);
|
||||||
|
|
||||||
-- The encoding routines take a String as input and encode the result
|
-- The encoding routines take a String as input and encode the result
|
||||||
-- using the specified UTF encoding method. The result includes a BOM if
|
-- using the specified UTF encoding method. The result includes a BOM if
|
||||||
|
@ -62,4 +62,4 @@ package Ada.Strings.UTF_Encoding.String_Encoding is
|
||||||
(Item : UTF_16_Wide_String) return String;
|
(Item : UTF_16_Wide_String) return String;
|
||||||
-- The input is encoded in UTF-16 and returned as a String value
|
-- The input is encoded in UTF-16 and returned as a String value
|
||||||
|
|
||||||
end Ada.Strings.UTF_Encoding.String_Encoding;
|
end Ada.Strings.UTF_Encoding.Strings;
|
|
@ -2,7 +2,7 @@
|
||||||
-- --
|
-- --
|
||||||
-- GNAT RUN-TIME COMPONENTS --
|
-- GNAT RUN-TIME COMPONENTS --
|
||||||
-- --
|
-- --
|
||||||
-- ADA.STRINGS.UTF_ENCODING.WIDE_STRING_ENCODING --
|
-- ADA.STRINGS.UTF_ENCODING.WIDE_STRINGS --
|
||||||
-- --
|
-- --
|
||||||
-- B o d y --
|
-- B o d y --
|
||||||
-- --
|
-- --
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
-- --
|
-- --
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
package body Ada.Strings.UTF_Encoding.Wide_String_Encoding is
|
package body Ada.Strings.UTF_Encoding.Wide_Strings is
|
||||||
use Interfaces;
|
use Interfaces;
|
||||||
|
|
||||||
------------
|
------------
|
||||||
|
@ -367,4 +367,4 @@ package body Ada.Strings.UTF_Encoding.Wide_String_Encoding is
|
||||||
return Result;
|
return Result;
|
||||||
end Encode;
|
end Encode;
|
||||||
|
|
||||||
end Ada.Strings.UTF_Encoding.Wide_String_Encoding;
|
end Ada.Strings.UTF_Encoding.Wide_Strings;
|
|
@ -2,7 +2,7 @@
|
||||||
-- --
|
-- --
|
||||||
-- GNAT RUN-TIME COMPONENTS --
|
-- GNAT RUN-TIME COMPONENTS --
|
||||||
-- --
|
-- --
|
||||||
-- ADA.STRINGS.UTF_ENCODING.WIDE_STRING_ENCODING --
|
-- ADA.STRINGS.UTF_ENCODING.WIDE_STRINGS --
|
||||||
-- --
|
-- --
|
||||||
-- S p e c --
|
-- S p e c --
|
||||||
-- --
|
-- --
|
||||||
|
@ -17,8 +17,8 @@
|
||||||
-- and decoding Wide_String values using UTF encodings. Note: this package is
|
-- and decoding Wide_String values using UTF encodings. Note: this package is
|
||||||
-- consistent with Ada 95, and may be included in Ada 95 implementations.
|
-- consistent with Ada 95, and may be included in Ada 95 implementations.
|
||||||
|
|
||||||
package Ada.Strings.UTF_Encoding.Wide_String_Encoding is
|
package Ada.Strings.UTF_Encoding.Wide_Strings is
|
||||||
pragma Pure (Wide_String_Encoding);
|
pragma Pure (Wide_Strings);
|
||||||
|
|
||||||
-- The encoding routines take a Wide_String as input and encode the result
|
-- The encoding routines take a Wide_String as input and encode the result
|
||||||
-- using the specified UTF encoding method. The result includes a BOM if
|
-- using the specified UTF encoding method. The result includes a BOM if
|
||||||
|
@ -64,4 +64,4 @@ package Ada.Strings.UTF_Encoding.Wide_String_Encoding is
|
||||||
(Item : UTF_16_Wide_String) return Wide_String;
|
(Item : UTF_16_Wide_String) return Wide_String;
|
||||||
-- The input is encoded in UTF-16 and returned as a Wide_String value
|
-- The input is encoded in UTF-16 and returned as a Wide_String value
|
||||||
|
|
||||||
end Ada.Strings.UTF_Encoding.Wide_String_Encoding;
|
end Ada.Strings.UTF_Encoding.Wide_Strings;
|
|
@ -2,7 +2,7 @@
|
||||||
-- --
|
-- --
|
||||||
-- GNAT RUN-TIME COMPONENTS --
|
-- GNAT RUN-TIME COMPONENTS --
|
||||||
-- --
|
-- --
|
||||||
-- ADA.STRINGS.UTF_ENCODING.WIDE_WIDE_STRING_ENCODING --
|
-- ADA.STRINGS.UTF_ENCODING.WIDE_WIDE_STRINGS --
|
||||||
-- --
|
-- --
|
||||||
-- B o d y --
|
-- B o d y --
|
||||||
-- --
|
-- --
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
-- --
|
-- --
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
package body Ada.Strings.UTF_Encoding.Wide_Wide_String_Encoding is
|
package body Ada.Strings.UTF_Encoding.Wide_Wide_Strings is
|
||||||
use Interfaces;
|
use Interfaces;
|
||||||
|
|
||||||
------------
|
------------
|
||||||
|
@ -426,4 +426,4 @@ package body Ada.Strings.UTF_Encoding.Wide_Wide_String_Encoding is
|
||||||
return Result (1 .. Len);
|
return Result (1 .. Len);
|
||||||
end Encode;
|
end Encode;
|
||||||
|
|
||||||
end Ada.Strings.UTF_Encoding.Wide_Wide_String_Encoding;
|
end Ada.Strings.UTF_Encoding.Wide_Wide_Strings;
|
|
@ -2,7 +2,7 @@
|
||||||
-- --
|
-- --
|
||||||
-- GNAT RUN-TIME COMPONENTS --
|
-- GNAT RUN-TIME COMPONENTS --
|
||||||
-- --
|
-- --
|
||||||
-- ADA.STRINGS.UTF_ENCODING.WIDE_WIDE_STRING_ENCODING --
|
-- ADA.STRINGS.UTF_ENCODING.WIDE_WIDE_STRINGS --
|
||||||
-- --
|
-- --
|
||||||
-- S p e c --
|
-- S p e c --
|
||||||
-- --
|
-- --
|
||||||
|
@ -18,8 +18,8 @@
|
||||||
-- consistent with Ada 2005, and may be used in Ada 2005 mode, but cannot be
|
-- consistent with Ada 2005, and may be used in Ada 2005 mode, but cannot be
|
||||||
-- used in Ada 95 mode, since Wide_Wide_Character is an Ada 2005 feature.
|
-- used in Ada 95 mode, since Wide_Wide_Character is an Ada 2005 feature.
|
||||||
|
|
||||||
package Ada.Strings.UTF_Encoding.Wide_Wide_String_Encoding is
|
package Ada.Strings.UTF_Encoding.Wide_Wide_Strings is
|
||||||
pragma Pure (Wide_Wide_String_Encoding);
|
pragma Pure (Wide_Wide_Strings);
|
||||||
|
|
||||||
-- The encoding routines take a Wide_Wide_String as input and encode the
|
-- The encoding routines take a Wide_Wide_String as input and encode the
|
||||||
-- result using the specified UTF encoding method. The result includes a
|
-- result using the specified UTF encoding method. The result includes a
|
||||||
|
@ -61,4 +61,4 @@ package Ada.Strings.UTF_Encoding.Wide_Wide_String_Encoding is
|
||||||
(Item : UTF_16_Wide_String) return Wide_Wide_String;
|
(Item : UTF_16_Wide_String) return Wide_Wide_String;
|
||||||
-- The input is encoded in UTF-16 and returned as a Wide_String value
|
-- The input is encoded in UTF-16 and returned as a Wide_String value
|
||||||
|
|
||||||
end Ada.Strings.UTF_Encoding.Wide_Wide_String_Encoding;
|
end Ada.Strings.UTF_Encoding.Wide_Wide_Strings;
|
|
@ -684,10 +684,18 @@ package body Ada.Text_IO is
|
||||||
Get_Immediate (Current_In, Item, Available);
|
Get_Immediate (Current_In, Item, Available);
|
||||||
end Get_Immediate;
|
end Get_Immediate;
|
||||||
|
|
||||||
|
--------------
|
||||||
|
-- Get_Line --
|
||||||
|
--------------
|
||||||
|
|
||||||
procedure Get_Line
|
procedure Get_Line
|
||||||
(File : File_Type;
|
(File : File_Type;
|
||||||
Item : out String;
|
Item : out String;
|
||||||
Last : out Natural) is separate;
|
Last : out Natural) is separate;
|
||||||
|
-- The implementation of Ada.Text_IO.Get_Line is split into a subunit so
|
||||||
|
-- that different implementations can be used on different systems. In
|
||||||
|
-- particular the standard implementation uses low level stuff that is
|
||||||
|
-- not appropriate for the JVM and .NET implementations.
|
||||||
|
|
||||||
procedure Get_Line
|
procedure Get_Line
|
||||||
(Item : out String;
|
(Item : out String;
|
||||||
|
|
|
@ -3151,8 +3151,11 @@ package body Exp_Ch5 is
|
||||||
else
|
else
|
||||||
-- We're about to drop Return_Object_Declarations on the floor, so
|
-- We're about to drop Return_Object_Declarations on the floor, so
|
||||||
-- we need to insert it, in case it got expanded into useful code.
|
-- we need to insert it, in case it got expanded into useful code.
|
||||||
|
-- Remove side effects from expression, which may be duplicated in
|
||||||
|
-- subsequent checks (see Expand_Simple_Function_Return).
|
||||||
|
|
||||||
Insert_List_Before (N, Return_Object_Declarations (N));
|
Insert_List_Before (N, Return_Object_Declarations (N));
|
||||||
|
Remove_Side_Effects (Exp);
|
||||||
|
|
||||||
-- Build simple_return_statement that returns the expression directly
|
-- Build simple_return_statement that returns the expression directly
|
||||||
|
|
||||||
|
@ -4248,18 +4251,23 @@ package body Exp_Ch5 is
|
||||||
end;
|
end;
|
||||||
|
|
||||||
-- AI05-0073: If function has a controlling access result, check that
|
-- AI05-0073: If function has a controlling access result, check that
|
||||||
-- the tag of the return value matches the designated type.
|
-- the tag of the return value, if it is not null, matches designated
|
||||||
|
-- type of return type.
|
||||||
|
|
||||||
-- The "or else True" needs commenting here ???
|
-- The "or else True" needs commenting here ???
|
||||||
|
|
||||||
elsif Ekind (R_Type) = E_Anonymous_Access_Type
|
elsif Ekind (R_Type) = E_Anonymous_Access_Type
|
||||||
and then Has_Controlling_Result (Scope_Id)
|
and then Has_Controlling_Result (Scope_Id)
|
||||||
and then (Ada_Version >= Ada_12 or else True)
|
|
||||||
then
|
then
|
||||||
Insert_Action (Exp,
|
Insert_Action (N,
|
||||||
Make_Raise_Constraint_Error (Loc,
|
Make_Raise_Constraint_Error (Loc,
|
||||||
Condition =>
|
Condition =>
|
||||||
|
Make_And_Then (Loc,
|
||||||
|
Left_Opnd =>
|
||||||
Make_Op_Ne (Loc,
|
Make_Op_Ne (Loc,
|
||||||
|
Left_Opnd => Exp,
|
||||||
|
Right_Opnd => Make_Null (Loc)),
|
||||||
|
Right_Opnd => Make_Op_Ne (Loc,
|
||||||
Left_Opnd =>
|
Left_Opnd =>
|
||||||
Make_Selected_Component (Loc,
|
Make_Selected_Component (Loc,
|
||||||
Prefix => Duplicate_Subexpr (Exp),
|
Prefix => Duplicate_Subexpr (Exp),
|
||||||
|
@ -4269,8 +4277,9 @@ package body Exp_Ch5 is
|
||||||
Make_Attribute_Reference (Loc,
|
Make_Attribute_Reference (Loc,
|
||||||
Prefix =>
|
Prefix =>
|
||||||
New_Occurrence_Of (Designated_Type (R_Type), Loc),
|
New_Occurrence_Of (Designated_Type (R_Type), Loc),
|
||||||
Attribute_Name => Name_Tag)),
|
Attribute_Name => Name_Tag))),
|
||||||
Reason => CE_Tag_Check_Failed));
|
Reason => CE_Tag_Check_Failed),
|
||||||
|
Suppress => All_Checks);
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
-- If we are returning an object that may not be bit-aligned, then copy
|
-- If we are returning an object that may not be bit-aligned, then copy
|
||||||
|
|
|
@ -180,8 +180,8 @@ package body Impunit is
|
||||||
"a-wichha", -- Ada.Wide_Characters.Handling
|
"a-wichha", -- Ada.Wide_Characters.Handling
|
||||||
"a-stuten", -- Ada.Strings.UTF_Encoding
|
"a-stuten", -- Ada.Strings.UTF_Encoding
|
||||||
"a-suenco", -- Ada.Strings.UTF_Encoding.Conversions
|
"a-suenco", -- Ada.Strings.UTF_Encoding.Conversions
|
||||||
"a-suesen", -- Ada.Strings.UTF_Encoding.String_Encoding
|
"a-suenst", -- Ada.Strings.UTF_Encoding.Strings
|
||||||
"a-suewse", -- Ada.Strings.UTF_Encoding.Wide_String_Encoding
|
"a-suewst", -- Ada.Strings.UTF_Encoding.Wide_Strings
|
||||||
|
|
||||||
---------------------------
|
---------------------------
|
||||||
-- GNAT Special IO Units --
|
-- GNAT Special IO Units --
|
||||||
|
@ -474,7 +474,7 @@ package body Impunit is
|
||||||
-- Note: strictly the following should be Ada 2012 units, but it seems
|
-- Note: strictly the following should be Ada 2012 units, but it seems
|
||||||
-- harmless (and useful) to make then available in Ada 2005 mode.
|
-- harmless (and useful) to make then available in Ada 2005 mode.
|
||||||
|
|
||||||
"a-suezse", -- Ada.Strings.UTF_Encoding.Wide_Wide_String_Encoding
|
"a-suezst", -- Ada.Strings.UTF_Encoding.Wide_Wide_Strings
|
||||||
|
|
||||||
---------------------------
|
---------------------------
|
||||||
-- GNAT Special IO Units --
|
-- GNAT Special IO Units --
|
||||||
|
|
|
@ -265,7 +265,6 @@ package Rtsfind is
|
||||||
System_Machine_Code,
|
System_Machine_Code,
|
||||||
System_Mantissa,
|
System_Mantissa,
|
||||||
System_Memcop,
|
System_Memcop,
|
||||||
System_Multiprocessors,
|
|
||||||
System_Pack_03,
|
System_Pack_03,
|
||||||
System_Pack_05,
|
System_Pack_05,
|
||||||
System_Pack_06,
|
System_Pack_06,
|
||||||
|
|
|
@ -495,8 +495,16 @@ package body Sem_Ch6 is
|
||||||
-- In GNAT mode, this is just a warning, to allow it to be
|
-- In GNAT mode, this is just a warning, to allow it to be
|
||||||
-- evilly turned off. Otherwise it is a real error.
|
-- evilly turned off. Otherwise it is a real error.
|
||||||
|
|
||||||
|
-- In a generic context, simplify the warning because it makes
|
||||||
|
-- no sense to discuss pass-by-reference or copy.
|
||||||
|
|
||||||
elsif Warn_On_Ada_2005_Compatibility or GNAT_Mode then
|
elsif Warn_On_Ada_2005_Compatibility or GNAT_Mode then
|
||||||
if Is_Immutably_Limited_Type (R_Type) then
|
if Inside_A_Generic then
|
||||||
|
Error_Msg_N
|
||||||
|
("return of limited object not permitted in Ada2005 " &
|
||||||
|
"(RM-2005 6.5(5.5/2))?", Expr);
|
||||||
|
|
||||||
|
elsif Is_Immutably_Limited_Type (R_Type) then
|
||||||
Error_Msg_N
|
Error_Msg_N
|
||||||
("return by reference not permitted in Ada 2005 " &
|
("return by reference not permitted in Ada 2005 " &
|
||||||
"(RM-2005 6.5(5.5/2))?", Expr);
|
"(RM-2005 6.5(5.5/2))?", Expr);
|
||||||
|
@ -512,10 +520,12 @@ package body Sem_Ch6 is
|
||||||
return; -- skip continuation messages below
|
return; -- skip continuation messages below
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
|
if not Inside_A_Generic then
|
||||||
Error_Msg_N
|
Error_Msg_N
|
||||||
("\consider switching to return of access type", Expr);
|
("\consider switching to return of access type", Expr);
|
||||||
Explain_Limited_Type (R_Type, Expr);
|
Explain_Limited_Type (R_Type, Expr);
|
||||||
end if;
|
end if;
|
||||||
|
end if;
|
||||||
end Check_Limited_Return;
|
end Check_Limited_Return;
|
||||||
|
|
||||||
-------------------------------------
|
-------------------------------------
|
||||||
|
@ -764,6 +774,14 @@ package body Sem_Ch6 is
|
||||||
and then Object_Access_Level (Expr) >
|
and then Object_Access_Level (Expr) >
|
||||||
Subprogram_Access_Level (Scope_Id)
|
Subprogram_Access_Level (Scope_Id)
|
||||||
then
|
then
|
||||||
|
|
||||||
|
-- Suppress the message in a generic, where the rewriting
|
||||||
|
-- is irrelevant.
|
||||||
|
|
||||||
|
if Inside_A_Generic then
|
||||||
|
null;
|
||||||
|
|
||||||
|
else
|
||||||
Rewrite (N,
|
Rewrite (N,
|
||||||
Make_Raise_Program_Error (Loc,
|
Make_Raise_Program_Error (Loc,
|
||||||
Reason => PE_Accessibility_Check_Failed));
|
Reason => PE_Accessibility_Check_Failed));
|
||||||
|
@ -775,6 +793,7 @@ package body Sem_Ch6 is
|
||||||
("\& will be raised at run time?",
|
("\& will be raised at run time?",
|
||||||
N, Standard_Program_Error);
|
N, Standard_Program_Error);
|
||||||
end if;
|
end if;
|
||||||
|
end if;
|
||||||
|
|
||||||
if Known_Null (Expr)
|
if Known_Null (Expr)
|
||||||
and then Nkind (Parent (Scope_Id)) = N_Function_Specification
|
and then Nkind (Parent (Scope_Id)) = N_Function_Specification
|
||||||
|
@ -4255,9 +4274,11 @@ package body Sem_Ch6 is
|
||||||
declare
|
declare
|
||||||
Typ : constant Entity_Id := Etype (Designator);
|
Typ : constant Entity_Id := Etype (Designator);
|
||||||
Utyp : constant Entity_Id := Underlying_Type (Typ);
|
Utyp : constant Entity_Id := Underlying_Type (Typ);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if Is_Immutably_Limited_Type (Typ) then
|
if Is_Immutably_Limited_Type (Typ) then
|
||||||
Set_Returns_By_Ref (Designator);
|
Set_Returns_By_Ref (Designator);
|
||||||
|
|
||||||
elsif Present (Utyp) and then CW_Or_Has_Controlled_Part (Utyp) then
|
elsif Present (Utyp) and then CW_Or_Has_Controlled_Part (Utyp) then
|
||||||
Set_Returns_By_Ref (Designator);
|
Set_Returns_By_Ref (Designator);
|
||||||
end if;
|
end if;
|
||||||
|
|
Loading…
Reference in New Issue