diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-06-13 11:43:03 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-06-13 11:43:03 +0200 |
commit | 5af638c8755a06886c68016348d76526d544681e (patch) | |
tree | 49b64477cb77b9825f308d4b15a2540abb0be1b7 | |
parent | 7f2c8954dac84a3fa5cabcc726b5e7d1ddff1142 (diff) | |
download | gcc-5af638c8755a06886c68016348d76526d544681e.tar.gz |
[multiple changes]
2014-06-13 Robert Dewar <dewar@adacore.com>
* back_end.ads, back_end.adb: Make_Id, Make_SC, Set_RND are moved to
Tbuild.
* tbuild.ads, tbuild.adb: Make_Id, Make_SC, Set_RND are moved here from
Back_End.
* gnat1drv.adb: Make_Id, Make_SC, Set_RND are moved to Tbuild
* sem_warn.adb: Minor reformatting.
2014-06-13 Doug Rupp <rupp@adacore.com>
* adaint.c (__gnat_open_new_temp) [VMS]: Open binary
files with rfm=udf.
From-SVN: r211612
-rw-r--r-- | gcc/ada/ChangeLog | 14 | ||||
-rw-r--r-- | gcc/ada/adaint.c | 9 | ||||
-rw-r--r-- | gcc/ada/back_end.adb | 43 | ||||
-rw-r--r-- | gcc/ada/back_end.ads | 11 | ||||
-rw-r--r-- | gcc/ada/gnat1drv.adb | 7 | ||||
-rw-r--r-- | gcc/ada/sem_warn.adb | 2 | ||||
-rw-r--r-- | gcc/ada/tbuild.adb | 42 | ||||
-rw-r--r-- | gcc/ada/tbuild.ads | 12 |
8 files changed, 79 insertions, 61 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 3a0b1e6567e..10ada4fcb7a 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,17 @@ +2014-06-13 Robert Dewar <dewar@adacore.com> + + * back_end.ads, back_end.adb: Make_Id, Make_SC, Set_RND are moved to + Tbuild. + * tbuild.ads, tbuild.adb: Make_Id, Make_SC, Set_RND are moved here from + Back_End. + * gnat1drv.adb: Make_Id, Make_SC, Set_RND are moved to Tbuild + * sem_warn.adb: Minor reformatting. + +2014-06-13 Doug Rupp <rupp@adacore.com> + + * adaint.c (__gnat_open_new_temp) [VMS]: Open binary + files with rfm=udf. + 2014-06-13 Yannick Moy <moy@adacore.com> * sem_warn.adb (Check_Unset_References): Take diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c index 8d574da2cc8..b1d31b79a96 100644 --- a/gcc/ada/adaint.c +++ b/gcc/ada/adaint.c @@ -6,7 +6,7 @@ * * * C Implementation File * * * - * Copyright (C) 1992-2013, Free Software Foundation, Inc. * + * Copyright (C) 1992-2014, 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- * @@ -1159,9 +1159,12 @@ __gnat_open_new_temp (char *path, int fmode) o_fmode = O_TEXT; #if defined (VMS) + /* Passing rfm=stmlf for binary files seems questionable since it results + in having an extraneous line feed added after every call to CRTL write, + so pass rfm=udf (aka undefined) instead. */ fd = open (path, O_WRONLY | O_CREAT | O_EXCL | o_fmode, PERM, - "rfm=stmlf", "ctx=rec", "rat=none", "shr=del,get,put,upd", - "mbc=16", "deq=64", "fop=tef"); + fmode ? "rfm=stmlf" : "rfm=udf", "ctx=rec", "rat=none", + "shr=del,get,put,upd", "mbc=16", "deq=64", "fop=tef"); #else fd = open (path, O_WRONLY | O_CREAT | O_EXCL | o_fmode, PERM); #endif diff --git a/gcc/ada/back_end.adb b/gcc/ada/back_end.adb index 6c763ced348..b79f1f9072a 100644 --- a/gcc/ada/back_end.adb +++ b/gcc/ada/back_end.adb @@ -24,7 +24,6 @@ ------------------------------------------------------------------------------ with Atree; use Atree; -with Csets; use Csets; with Debug; use Debug; with Elists; use Elists; with Errout; use Errout; @@ -34,14 +33,13 @@ with Opt; use Opt; with Osint.C; use Osint.C; with Namet; use Namet; with Nlists; use Nlists; -with Nmake; use Nmake; -with Restrict; use Restrict; with Stand; use Stand; with Sinput; use Sinput; with Stringt; use Stringt; with Switch; use Switch; with Switch.C; use Switch.C; with System; use System; +with Types; use Types; with System.OS_Lib; use System.OS_Lib; @@ -189,36 +187,6 @@ package body Back_End is raise Program_Error; end Len_Arg; - ------------- - -- Make_Id -- - ------------- - - function Make_Id (Str : Text_Buffer) return Node_Id is - begin - Name_Len := 0; - - for J in Str'Range loop - Name_Len := Name_Len + 1; - Name_Buffer (Name_Len) := Fold_Lower (Str (J)); - end loop; - - return - Make_Identifier (System_Location, - Chars => Name_Find); - end Make_Id; - - ------------- - -- Make_SC -- - ------------- - - function Make_SC (Pre, Sel : Node_Id) return Node_Id is - begin - return - Make_Selected_Component (System_Location, - Prefix => Pre, - Selector_Name => Sel); - end Make_SC; - ----------------------------- -- Scan_Compiler_Arguments -- ----------------------------- @@ -383,13 +351,4 @@ package body Back_End is end loop; end Scan_Compiler_Arguments; - ------------- - -- Set_RND -- - ------------- - - procedure Set_RND (Unit : Node_Id) is - begin - Restrict.Set_Restriction_No_Dependence (Unit, Warn => False); - end Set_RND; - end Back_End; diff --git a/gcc/ada/back_end.ads b/gcc/ada/back_end.ads index d301791fee2..0d45a9ba7e6 100644 --- a/gcc/ada/back_end.ads +++ b/gcc/ada/back_end.ads @@ -27,8 +27,6 @@ -- Note: there are multiple bodies/variants of this package, so do not -- modify this spec without coordination. -with Types; use Types; - package Back_End is type Back_End_Mode_Type is ( @@ -86,13 +84,4 @@ package Back_End is -- object file's timestamp is correct when compared with the corresponding -- ali file by gnatmake. - function Make_Id (Str : Text_Buffer) return Node_Id; - function Make_SC (Pre, Sel : Node_Id) return Node_Id; - procedure Set_RND (Unit : Node_Id); - -- Subprograms for call to Get_Target_Parameters, see spec of package - -- Targparm for full description of these three subprograms. These are - -- parked in this package because they are have to be at the top level - -- because of accessibility issues, and Gnat1drv, which is where they - -- are used, is a subprogram. - end Back_End; diff --git a/gcc/ada/gnat1drv.adb b/gcc/ada/gnat1drv.adb index 3a390dcb332..a2cc08912b2 100644 --- a/gcc/ada/gnat1drv.adb +++ b/gcc/ada/gnat1drv.adb @@ -69,6 +69,7 @@ with Sprint; use Sprint; with Stringt; with Stylesw; use Stylesw; with Targparm; use Targparm; +with Tbuild; with Tree_Gen; with Treepr; use Treepr; with Ttypes; @@ -818,9 +819,9 @@ begin (System_Text => Source_Text (S), Source_First => Source_First (S), Source_Last => Source_Last (S), - Make_Id => Back_End.Make_Id'Unrestricted_Access, - Make_SC => Back_End.Make_SC'Unrestricted_Access, - Set_RND => Back_End.Set_RND'Unrestricted_Access); + Make_Id => Tbuild.Make_Id'Access, + Make_SC => Tbuild.Make_SC'Access, + Set_RND => Tbuild.Set_RND'Access); -- Acquire configuration pragma information from Targparm diff --git a/gcc/ada/sem_warn.adb b/gcc/ada/sem_warn.adb index 4c2f78c2bc2..d54937b8d4a 100644 --- a/gcc/ada/sem_warn.adb +++ b/gcc/ada/sem_warn.adb @@ -1810,7 +1810,7 @@ package body Sem_Warn is SE : constant Entity_Id := Scope (E); function Within_Postcondition return Boolean; - -- Returns True iff N is within a Postcondition, a + -- Returns True if N is within a Postcondition, a -- Refined_Post, an Ensures component in a Test_Case, -- or a Contract_Cases. diff --git a/gcc/ada/tbuild.adb b/gcc/ada/tbuild.adb index 524c14f7100..17ca12eac8c 100644 --- a/gcc/ada/tbuild.adb +++ b/gcc/ada/tbuild.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2013, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2014, 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- -- @@ -24,6 +24,7 @@ ------------------------------------------------------------------------------ with Atree; use Atree; +with Csets; use Csets; with Einfo; use Einfo; with Elists; use Elists; with Lib; use Lib; @@ -240,6 +241,24 @@ package body Tbuild is end if; end Make_Float_Literal; + ------------- + -- Make_Id -- + ------------- + + function Make_Id (Str : Text_Buffer) return Node_Id is + begin + Name_Len := 0; + + for J in Str'Range loop + Name_Len := Name_Len + 1; + Name_Buffer (Name_Len) := Fold_Lower (Str (J)); + end loop; + + return + Make_Identifier (System_Location, + Chars => Name_Find); + end Make_Id; + ------------------------------------- -- Make_Implicit_Exception_Handler -- ------------------------------------- @@ -459,6 +478,18 @@ package body Tbuild is UI_From_Int (RT_Exception_Code'Pos (Reason))); end Make_Raise_Storage_Error; + ------------- + -- Make_SC -- + ------------- + + function Make_SC (Pre, Sel : Node_Id) return Node_Id is + begin + return + Make_Selected_Component (System_Location, + Prefix => Pre, + Selector_Name => Sel); + end Make_SC; + ------------------------- -- Make_String_Literal -- ------------------------- @@ -749,6 +780,15 @@ package body Tbuild is return Result; end OK_Convert_To; + ------------- + -- Set_RND -- + ------------- + + procedure Set_RND (Unit : Node_Id) is + begin + Set_Restriction_No_Dependence (Unit, Warn => False); + end Set_RND; + -------------------------- -- Unchecked_Convert_To -- -------------------------- diff --git a/gcc/ada/tbuild.ads b/gcc/ada/tbuild.ads index 507dca41bf1..67a59d923c3 100644 --- a/gcc/ada/tbuild.ads +++ b/gcc/ada/tbuild.ads @@ -321,4 +321,16 @@ package Tbuild is -- Like Convert_To, but if a conversion is actually needed, constructs an -- N_Unchecked_Type_Conversion node to do the required conversion. + ------------------------------------- + -- Subprograms for Use by Gnat1drv -- + ------------------------------------- + + function Make_Id (Str : Text_Buffer) return Node_Id; + function Make_SC (Pre, Sel : Node_Id) return Node_Id; + procedure Set_RND (Unit : Node_Id); + -- Subprograms for call to Get_Target_Parameters in Gnat1drv, see spec + -- of package Targparm for full description of these three subprograms. + -- These have to be declared at the top level of a package (accessibility + -- issues), and Gnat1drv is a procedure, so they can't go there. + end Tbuild; |