* par_sco.adb (Traverse_Declarations_Or_Statements): Add processing for
N_Label. Remove SCO table entry for entry point (not used).
* par_sco.ads: Remove SCO entry point type (not used)
* switch.adb: Minor code clean up.
2009-07-15 Eric Botcazou <ebotcazou@adacore.com>
* exp_dbug.ads (Base Record Types): Document enhanced encoding.
2009-07-15 Thomas Quinot <quinot@adacore.com>
* gnatls.adb: Minor reformatting
* gnatcmd.adb: Minor code reorganization
2009-07-15 Ed Schonberg <schonberg@adacore.com>
* exp_util.adb (Component_May_Be_Bit_Aligned): Use underlying type to
determine whether a component of a private type has a composite type.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149688
138bc75d-0d04-0410-961f-
82ee72b054a4
2009-07-15 Robert Dewar <dewar@adacore.com>
+ * par_sco.adb (Traverse_Declarations_Or_Statements): Add processing for
+ N_Label. Remove SCO table entry for entry point (not used).
+
+ * par_sco.ads: Remove SCO entry point type (not used)
+
+ * switch.adb: Minor code clean up.
+
+2009-07-15 Eric Botcazou <ebotcazou@adacore.com>
+
+ * exp_dbug.ads (Base Record Types): Document enhanced encoding.
+
+2009-07-15 Thomas Quinot <quinot@adacore.com>
+
+ * gnatls.adb: Minor reformatting
+
+ * gnatcmd.adb: Minor code reorganization
+
+2009-07-15 Ed Schonberg <schonberg@adacore.com>
+
+ * exp_util.adb (Component_May_Be_Bit_Aligned): Use underlying type to
+ determine whether a component of a private type has a composite type.
+
+2009-07-15 Robert Dewar <dewar@adacore.com>
+
* sem_ch10.adb: Minor reformatting throughout
Minor code reorganization (put nested subprograms in alpha order)
-- Specifically, if this name is x, then we produce a record type named
-- x___XVS consisting of one field. The name of this field is that of
- -- the actual type being encoded, which we'll call y (the type of this
- -- single field is arbitrary). Both x and y may have corresponding
- -- ___XVE types.
+ -- the actual type being encoded, which we'll call y. The type of this
+ -- single field can be either an arbitrary non-reference type, e.g. an
+ -- integer type, or a reference type; in the latter case, the referenced
+ -- type is also the actual type being encoded y. Both x and y may have
+ -- corresponding ___XVE types.
-- The size of the objects typed as x should be obtained from the
-- structure of x (and x___XVE, if applicable) as for ordinary types
----------------------------------
function Component_May_Be_Bit_Aligned (Comp : Entity_Id) return Boolean is
+ UT : constant Entity_Id := Underlying_Type (Etype (Comp));
begin
-- If no component clause, then everything is fine, since the back end
-- never bit-misaligns by default, even if there is a pragma Packed for
-- It is only array and record types that cause trouble
- if not Is_Record_Type (Etype (Comp))
- and then not Is_Array_Type (Etype (Comp))
+ if not Is_Record_Type (UT)
+ and then not Is_Array_Type (UT)
then
return False;
-- back end can handle these cases correctly.
elsif Esize (Comp) <= 64
- and then (Is_Record_Type (Etype (Comp))
- or else Is_Bit_Packed_Array (Etype (Comp)))
+ and then (Is_Record_Type (UT)
+ or else Is_Bit_Packed_Array (UT))
then
return False;
if Project = No_Project then
return False;
- elsif All_Projects or Project = Root_Project then
+ elsif All_Projects or else Project = Root_Project then
return True;
elsif The_Command = Metric then
Process_Link;
end if;
- if The_Command = Link or The_Command = Bind then
+ if The_Command = Link or else The_Command = Bind then
-- For files that are specified as relative paths with directory
-- information, we convert them to absolute paths, with parent
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2008, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
function Image (Restriction : Restriction_Id) return String;
-- Returns the capitalized image of Restriction
- ---------------------------------------
- -- GLADE specific output subprograms --
- ---------------------------------------
+ ------------------------------------------
+ -- GNATDIST specific output subprograms --
+ ------------------------------------------
- package GLADE is
+ package GNATDIST is
- -- Any modification to this subunit requires a synchronization
- -- with the GLADE implementation.
+ -- Any modification to this subunit requires a synchronization with
+ -- GNATDIST sources.
procedure Output_ALI (A : ALI_Id);
procedure Output_No_ALI (Afile : File_Name_Type);
- end GLADE;
+ end GNATDIST;
-----------------
-- Add_Lib_Dir --
Source_End := Source_Start - 1;
if Print_Source then
- Source_End := Source_Start + Max_Src_Length;
+ Source_End := Source_Start + Max_Src_Length;
end if;
end Find_General_Layout;
end if;
end Find_Status;
- -----------
- -- GLADE --
- -----------
+ --------------
+ -- GNATDIST --
+ --------------
- package body GLADE is
+ package body GNATDIST is
N_Flags : Natural;
N_Indents : Natural := 0;
-- There is no full source name. This occurs for instance when a
-- withed unit has a spec file but no body file. This situation
- -- is not a problem for GLADE since the unit may be located on
+ -- is not a problem for GNATDIST since the unit may be located on
-- a partition we do not want to build. However, we need to
-- locate the spec file and to find its full source name.
-- Replace the body file name with the spec file name used to
N_Indents := N_Indents - 1;
end Output_With;
- end GLADE;
+ end GNATDIST;
-----------
-- Image --
if Ali_File = No_File then
if Very_Verbose_Mode then
- GLADE.Output_No_ALI (Lib_File_Name (Main_File));
+ GNATDIST.Output_No_ALI (Lib_File_Name (Main_File));
else
Write_Str ("Can't find library info for ");
if Very_Verbose_Mode then
for A in ALIs.First .. ALIs.Last loop
- GLADE.Output_ALI (A);
+ GNATDIST.Output_ALI (A);
end loop;
return;
-- To = ending sloc
-- Last = unused
- -- Entry
- -- C1 = 'Y'
- -- C2 = ' '
- -- From = starting sloc
- -- To = ending sloc
- -- Last = unused
-
-- Exit
-- C1 = 'T'
-- C2 = ' '
case T.C1 is
- -- Statements, entry, exit
+ -- Statements, exit
- when 'S' | 'Y' | 'T' =>
+ when 'S' | 'T' =>
Write_Info_Char (' ');
Output_Range (T.From, T.To);
Sloc_Range (N, From, To);
Set_Table_Entry ('T', ' ', From, To, False);
+ -- Label (breaks statement sequence)
+
+ when N_Label =>
+ Set_Statement_Entry;
+
-- Block statement
when N_Block_Statement =>
-- CS sloc-range
- -- Entry points
-
- -- An entry point is a statement to which control may be passed other
- -- than by falling into the statement for above. Examples are the first
- -- statement of the body of a loop, and the statement following a label.
- -- The form of an entry point in the ALI file is:
-
- -- CY sloc-range
-
-- Exit points
-- An exit point is a statement that causes transfer of control. Examples
begin
return Is_Switch (Switch_Chars)
and then
- (Switch_Chars (First .. Last) = "-param" or else
- Switch_Chars (First .. Last) = "dumpbase" or else
- Switch_Chars (First .. Last) = "auxbase-strip" or else
- Switch_Chars (First .. Last) = "auxbase");
+ (Switch_Chars (First .. Last) = "-param"
+ or else Switch_Chars (First .. Last) = "dumpbase"
+ or else Switch_Chars (First .. Last) = "auxbase-strip"
+ or else Switch_Chars (First .. Last) = "auxbase");
end Is_Internal_GCC_Switch;
---------------
-----------------
function Switch_Last (Switch_Chars : String) return Natural is
- Last : constant Natural := Switch_Chars'Last;
+ Last : Natural := Switch_Chars'Last;
begin
if Last >= Switch_Chars'First
and then Switch_Chars (Last) = ASCII.NUL
then
- return Last - 1;
- else
- return Last;
+ Last := Last - 1;
end if;
+
+ return Last;
end Switch_Last;
-----------------