* lib-xref.adb (OK_To_Set_Referenced): A reference to a formal
in a parameter association must not set the Referenced flag on
the formal.
* prj-nmsc.adb (Check_File_Naming_Schemes): Remove useless formal
2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
* gnat_rm.texi: Add a section on attribute Descriptor_Size
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178587
138bc75d-0d04-0410-961f-
82ee72b054a4
+2011-09-06 Ed Schonberg <schonberg@adacore.com>
+
+ * lib-xref.adb (OK_To_Set_Referenced): A reference to a formal
+ in a parameter association must not set the Referenced flag on
+ the formal.
+ * prj-nmsc.adb (Check_File_Naming_Schemes): Remove useless formal
+
+2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
+
+ * gnat_rm.texi: Add a section on attribute Descriptor_Size
+
2011-09-06 Arnaud Charlet <charlet@adacore.com>
* gcc-interface/Makefile.in (common-tools, gnatmake-re,
* Compiler_Version::
* Code_Address::
* Default_Bit_Order::
+* Descriptor_Size::
* Elaborated::
* Elab_Body::
* Elab_Spec::
* Compiler_Version::
* Code_Address::
* Default_Bit_Order::
+* Descriptor_Size::
* Elaborated::
* Elab_Body::
* Elab_Spec::
@code{Low_Order_First}). This is used to construct the definition of
@code{Default_Bit_Order} in package @code{System}.
+@node Descriptor_Size
+@unnumberedsec Descriptor_Size
+@cindex Descriptor
+@cindex Dope vector
+@findex Descriptor_Size
+@noindent
+Attribute @code{Descriptor_Size} returns the size in bits of the descriptor
+allocated for an unconstrained array type. An array descriptor contains bounds
+information and is located immediately before the first element of the array.
+The value of attribute @code{Descriptor_Size} is of type universal integer.
+
+@smallexample @c ada
+type Unconstr_Array is array (Positive range <>) of Boolean;
+Put_Line ("Descriptor size = " & Unconstr_Array'Descriptor_Size'Img);
+@end smallexample
+
+@noindent
+The attribute takes into account any additional padding due to type alignment.
+In the example above, the descriptor contains two values of type
+@code{Positive} representing the low and high bound. Since @code{Positive} has
+a size of 31 bits and an alignment of 4, the descriptor size is @code{2 *
+Positive'Size + 2} or 64 bits.
+
@node Elaborated
@unnumberedsec Elaborated
@findex Elaborated
return False;
end if;
end if;
+
+ -- A reference to a formal in a named parameter association does
+ -- not make the formal referenced. Formals that are unused in the
+ -- subprogram body are properly flagged as such, even if calls
+ -- elsewhere use named notation.
+
+ elsif Nkind (P) = N_Parameter_Association
+ and then N = Selector_Name (P)
+ then
+ return False;
end if;
end if;
-- otherwise only those currently set in the Source_Names hash table.
procedure Check_File_Naming_Schemes
- (In_Tree : Project_Tree_Ref;
- Project : Project_Processing_Data;
+ (Project : Project_Processing_Data;
File_Name : File_Name_Type;
Alternate_Languages : out Language_List;
Language : out Language_Ptr;
-------------------------------
procedure Check_File_Naming_Schemes
- (In_Tree : Project_Tree_Ref;
- Project : Project_Processing_Data;
+ (Project : Project_Processing_Data;
File_Name : File_Name_Type;
Alternate_Languages : out Language_List;
Language : out Language_Ptr;
if Check_Name then
Check_File_Naming_Schemes
- (In_Tree => Data.Tree,
- Project => Project,
+ (Project => Project,
File_Name => File_Name,
Alternate_Languages => Alternate_Languages,
Language => Language,