+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
* *
* 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- *
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
------------------------------------------------------------------------------
with Atree; use Atree;
-with Csets; use Csets;
with Debug; use Debug;
with Elists; use Elists;
with Errout; use Errout;
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;
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 --
-----------------------------
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;
-- 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 (
-- 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;
with Stringt;
with Stylesw; use Stylesw;
with Targparm; use Targparm;
+with Tbuild;
with Tree_Gen;
with Treepr; use Treepr;
with Ttypes;
(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
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.
-- --
-- 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- --
------------------------------------------------------------------------------
with Atree; use Atree;
+with Csets; use Csets;
with Einfo; use Einfo;
with Elists; use Elists;
with Lib; use Lib;
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 --
-------------------------------------
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 --
-------------------------
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 --
--------------------------
-- 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;