diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-04-29 17:36:48 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-04-29 17:36:48 +0200 |
commit | 70b70ce8ca44e0be23f7d0d455bd5eb96b4d8bdc (patch) | |
tree | 354ba68f8595585bb73dc032ebed6244a0ed9280 /gcc/ada/xoscons.adb | |
parent | 4cc51f5e3814161aec162c8ca55482b422428b53 (diff) | |
download | gcc-70b70ce8ca44e0be23f7d0d455bd5eb96b4d8bdc.zip gcc-70b70ce8ca44e0be23f7d0d455bd5eb96b4d8bdc.tar.gz gcc-70b70ce8ca44e0be23f7d0d455bd5eb96b4d8bdc.tar.bz2 |
[multiple changes]
2009-04-29 Ed Schonberg <schonberg@adacore.com>
* sem_ch8.adb (Analyze_Subprogram_Renaming): Improve error message on
box-defaulted operator in an instantiation, when the type of the
operands is not directly visible.
2009-04-29 Gary Dismukes <dismukes@adacore.com>
* sem_aggr.adb (Valid_Limited_Ancestor): Undo previous change.
(Resolve_Extension_Aggregate): Call Check_Parameterless_Call after the
analysis of the ancestor part. Remove prohibition against limited
interpretations of the ancestor expression in the case of Ada 2005.
Revise error message in overloaded case, adding a message to cover
the Ada 2005 case.
2009-04-29 Thomas Quinot <quinot@adacore.com>
* xoscons.adb: Minor reformatting
2009-04-29 Bob Duff <duff@adacore.com>
* sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not ignore
attribute_definition_clauses for the following attributes when the
-gnatI switch is used: External_Tag, Input, Output, Read, Storage_Pool,
Storage_Size, Write. Otherwise, we get spurious errors (for example,
missing Read attribute on remote types).
* gnat_ugn.texi: Document the change, and add a stern warning.
2009-04-29 Ed Schonberg <schonberg@adacore.com>
* sem_attr.adb (Check_Local_Access): Indicate that value tracing is
disabled not just for the current scope, but for the innermost dynamic
scope as well.
From-SVN: r146979
Diffstat (limited to 'gcc/ada/xoscons.adb')
-rw-r--r-- | gcc/ada/xoscons.adb | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/gcc/ada/xoscons.adb b/gcc/ada/xoscons.adb index 64a9e79..08aac90 100644 --- a/gcc/ada/xoscons.adb +++ b/gcc/ada/xoscons.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2008, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-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- -- @@ -30,7 +30,7 @@ -- - the preprocessed C file: s-oscons-tmplt.i -- - the generated assembly file: s-oscons-tmplt.s --- The contents of s-oscons.ads is written on standard output +-- The contents of s-oscons.ads is written on standard output. with Ada.Characters.Handling; use Ada.Characters.Handling; with Ada.Exceptions; use Ada.Exceptions; @@ -59,13 +59,13 @@ procedure XOSCons is -- Information retrieved from assembly listing -- ------------------------------------------------- - -- We need to deal with integer values that can be signed or unsigned, - -- so we need to cater for the maximum range of both cases. - type String_Access is access all String; -- Note: we can't use GNAT.Strings for this definition, since that unit -- is not available in older base compilers. + -- We need to deal with integer values that can be signed or unsigned, so + -- we need to accomodate the maximum range of both cases. + type Int_Value_Type is record Positive : Boolean; Abs_Value : Long_Unsigned := 0; @@ -75,8 +75,8 @@ procedure XOSCons is (CND, -- Constant (decimal) CNS, -- Constant (freeform string) TXT); -- Literal text - -- Recognized markers found in assembly file. These markers are produced - -- by the same-named macros from the C template. + -- Recognized markers found in assembly file. These markers are produced by + -- the same-named macros from the C template. type Asm_Info (Kind : Asm_Info_Kind := TXT) is record Line_Number : Integer; @@ -98,16 +98,16 @@ procedure XOSCons is -- Additional descriptive comment for constant, or free-form text (TXT) end record; - package Asm_Infos is new GNAT.Table ( - Table_Component_Type => Asm_Info, + package Asm_Infos is new GNAT.Table + (Table_Component_Type => Asm_Info, Table_Index_Type => Integer, Table_Low_Bound => 1, Table_Initial => 100, Table_Increment => 10); - Max_Const_Name_Len : Natural := 0; + Max_Const_Name_Len : Natural := 0; Max_Constant_Value_Len : Natural := 0; - -- Longest name and longest value lengths + -- Lengths of longest name and longest value type Language is (Lang_Ada, Lang_C); @@ -152,6 +152,7 @@ procedure XOSCons is Info : Asm_Info renames Asm_Infos.Table (Info_Index); procedure Put (S : String); + -- Write S to OFile --------- -- Put -- @@ -253,9 +254,7 @@ procedure XOSCons is -- On some platforms, immediate integer values are prefixed with -- a $ or # character in assembly output. - if S (First) = '$' - or else S (First) = '#' - then + if S (First) = '$' or else S (First) = '#' then First := First + 1; end if; @@ -306,6 +305,7 @@ procedure XOSCons is if Info.Kind = CND then Info.Int_Value := Parse_Int (Line (Index1 .. Index2 - 1)); Info.Value_Len := Index2 - Index1 - 1; + else Info.Text_Value := Field_Alloc; Info.Value_Len := Info.Text_Value'Length; @@ -322,8 +322,8 @@ procedure XOSCons is if Info.Kind = TXT then Info.Text_Value := Info.Comment; - -- Update Max_Constant_Value_Len, but only if this constant has - -- a comment (else the value is allowed to be longer). + -- Update Max_Constant_Value_Len, but only if this constant has a + -- comment (else the value is allowed to be longer). elsif Info.Comment'Length > 0 then if Info.Value_Len > Max_Constant_Value_Len then @@ -398,7 +398,7 @@ begin -- Load C template and output definitions - Open (Tmpl_File, In_File, Tmpl_File_Name); + Open (Tmpl_File, In_File, Tmpl_File_Name); Create (Ada_OFile, Out_File, Ada_File_Name); Create (C_OFile, Out_File, C_File_Name); @@ -446,6 +446,7 @@ begin Output_Info (Lang_C, C_OFile, Current_Info); Current_Info := Current_Info + 1; end if; + Current_Line := Current_Line + 1; end if; end loop; |