From 9cd33a669fe96723b5d07c1b0bfa0b5a70dc03a3 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Wed, 15 Jul 2009 15:06:43 +0200 Subject: [multiple changes] 2009-07-15 Robert Dewar * 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 * exp_dbug.ads (Base Record Types): Document enhanced encoding. 2009-07-15 Thomas Quinot * gnatls.adb: Minor reformatting * gnatcmd.adb: Minor code reorganization 2009-07-15 Ed Schonberg * exp_util.adb (Component_May_Be_Bit_Aligned): Use underlying type to determine whether a component of a private type has a composite type. From-SVN: r149688 --- gcc/ada/ChangeLog | 24 ++++++++++++++++++++++++ gcc/ada/exp_dbug.ads | 8 +++++--- gcc/ada/exp_util.adb | 9 +++++---- gcc/ada/gnatcmd.adb | 4 ++-- gcc/ada/gnatls.adb | 34 +++++++++++++++++----------------- gcc/ada/par_sco.adb | 16 +++++++--------- gcc/ada/par_sco.ads | 9 --------- gcc/ada/switch.adb | 16 ++++++++-------- 8 files changed, 68 insertions(+), 52 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 8139e60..13cd178 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,5 +1,29 @@ 2009-07-15 Robert Dewar + * 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 + + * exp_dbug.ads (Base Record Types): Document enhanced encoding. + +2009-07-15 Thomas Quinot + + * gnatls.adb: Minor reformatting + + * gnatcmd.adb: Minor code reorganization + +2009-07-15 Ed Schonberg + + * 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 + * sem_ch10.adb: Minor reformatting throughout Minor code reorganization (put nested subprograms in alpha order) diff --git a/gcc/ada/exp_dbug.ads b/gcc/ada/exp_dbug.ads index 15e83aa..842456e 100644 --- a/gcc/ada/exp_dbug.ads +++ b/gcc/ada/exp_dbug.ads @@ -844,9 +844,11 @@ package Exp_Dbug is -- 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 diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb index b396ee5..1031050 100644 --- a/gcc/ada/exp_util.adb +++ b/gcc/ada/exp_util.adb @@ -913,6 +913,7 @@ package body Exp_Util is ---------------------------------- 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 @@ -924,8 +925,8 @@ package body Exp_Util is -- 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; @@ -934,8 +935,8 @@ package body Exp_Util is -- 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; diff --git a/gcc/ada/gnatcmd.adb b/gcc/ada/gnatcmd.adb index c3ec70c..f0e7e74 100644 --- a/gcc/ada/gnatcmd.adb +++ b/gcc/ada/gnatcmd.adb @@ -603,7 +603,7 @@ procedure GNATCmd is 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 @@ -2074,7 +2074,7 @@ begin 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 diff --git a/gcc/ada/gnatls.adb b/gcc/ada/gnatls.adb index 36e2ee6..1b7666f 100644 --- a/gcc/ada/gnatls.adb +++ b/gcc/ada/gnatls.adb @@ -6,7 +6,7 @@ -- -- -- 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- -- @@ -185,19 +185,19 @@ procedure Gnatls is 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 -- @@ -347,7 +347,7 @@ procedure Gnatls is 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; @@ -392,11 +392,11 @@ procedure Gnatls is end if; end Find_Status; - ----------- - -- GLADE -- - ----------- + -------------- + -- GNATDIST -- + -------------- - package body GLADE is + package body GNATDIST is N_Flags : Natural; N_Indents : Natural := 0; @@ -610,7 +610,7 @@ procedure Gnatls is -- 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 @@ -794,7 +794,7 @@ procedure Gnatls is N_Indents := N_Indents - 1; end Output_With; - end GLADE; + end GNATDIST; ----------- -- Image -- @@ -1754,7 +1754,7 @@ begin 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 "); @@ -1791,7 +1791,7 @@ begin if Very_Verbose_Mode then for A in ALIs.First .. ALIs.Last loop - GLADE.Output_ALI (A); + GNATDIST.Output_ALI (A); end loop; return; diff --git a/gcc/ada/par_sco.adb b/gcc/ada/par_sco.adb index 897b359..663959de 100644 --- a/gcc/ada/par_sco.adb +++ b/gcc/ada/par_sco.adb @@ -71,13 +71,6 @@ package body Par_SCO is -- To = ending sloc -- Last = unused - -- Entry - -- C1 = 'Y' - -- C2 = ' ' - -- From = starting sloc - -- To = ending sloc - -- Last = unused - -- Exit -- C1 = 'T' -- C2 = ' ' @@ -659,9 +652,9 @@ package body Par_SCO is 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); @@ -907,6 +900,11 @@ package body Par_SCO is 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 => diff --git a/gcc/ada/par_sco.ads b/gcc/ada/par_sco.ads index 5adee95..a977a11 100644 --- a/gcc/ada/par_sco.ads +++ b/gcc/ada/par_sco.ads @@ -98,15 +98,6 @@ package Par_SCO is -- 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 diff --git a/gcc/ada/switch.adb b/gcc/ada/switch.adb index cb5c4d1..0c761b6 100644 --- a/gcc/ada/switch.adb +++ b/gcc/ada/switch.adb @@ -148,10 +148,10 @@ package body Switch is 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; --------------- @@ -169,15 +169,15 @@ package body Switch is ----------------- 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; ----------------- -- cgit v1.1