This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Ada] AI 435

Tested on i686-linux, committed on trunk.

This is Ada 2005 AI-435, see
This AI makes it illegal to use Storage_Pool or Storage_Size
attributes on access to subprogram types (previously allowed),
and also to specify a storage pool for an access to subprogram
type (previously disallowed but now gives clearer error msg).

A simple test program is:

     1. with Ada.Text_IO;
     2. procedure Fooey is
     3.    type Acc_Proc is access procedure;
     5.    type Acc_Int is access Integer;
     6.    for Acc_Int'Storage_Pool use Acc_Proc'Storage_Pool;
        >>> cannot use "Storage_Pool" attribute for
            access-to-subprogram type

     8.    What : constant Integer := Acc_Proc'Storage_Size;
        >>> cannot use "Storage_Size" attribute for
            access-to-subprogram type

    10.    type M_Acc_Int is access Integer;
    11.    type M_Acc_Proc is access procedure;
    12.    for M_Acc_Proc'Storage_Pool use M_Acc_Int'Storage_Pool;
        >>> storage pool cannot be given for
            access-to-subprogram type

    14. begin
    15.    Ada.Text_IO.Put_Line
    16.      ("Storage size of access to procedure = " &
    17.       Integer'Image (What));
    18. end Fooey;

Also implement Ada 2005 AI-240

2006-10-31  Robert Dewar  <>
	    Thomas Quinot  <>

	* sem_ch13.adb: Storage pool cannot be given for access to subprogram
	(New_Stream_Subprogram): When processing an attribute definition clause
	for a stream-oriented subprogram, record an entity node occurring at
	the point of clause to use for checking the visibility of the clause,
	as defined by 8.3(23) as amended by AI-195.
	(New_Stream_Subprogram): New procedure, factoring behaviour from both
	 New_Stream_Function and New_Stream_Procedure.
	(New_Stream_Function, New_Stream_Procedure): Removed.
	(Analyze_Attribute_Definition_Clause, case Address): Check new
	Alignment_Check check

Attachment: difs
Description: Text document

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]