+2009-04-08 Robert Dewar <dewar@adacore.com>
+
+ * ug_words: Add /ASSUME_VALID for -gnatB
+
+ * vms_data.ads: Add /ASSUME_VALID for -gnatB
+
+ * sem_cat.adb: Add clarifying commment
+
+ * a-direio.ads (Bytes): Make sure value is non-zero
+
+2009-04-08 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_util.adb (Is_Variable): If the prefix is an explicit dereference
+ that does not come from source, check for a rewritten function call in
+ prefixed notation before other forms of rewriting.
+
+2009-04-08 Robert Dewar <dewar@adacore.com>
+
+ * Makefile.rtl: Remove s-strops and s-sopco? from the run time, since
+ these are now obsolescent units used only for bootrapping with an
+ older compiler.
+
2009-04-08 Robert Dewar <dewar@adacore.com>
* gnat_rm.texi: Add documentation for pragma Thread_Local_Storage
s-secsta$(objext) \
s-sequio$(objext) \
s-shasto$(objext) \
- s-sopco3$(objext) \
- s-sopco4$(objext) \
- s-sopco5$(objext) \
s-stache$(objext) \
s-stausa$(objext) \
s-stchop$(objext) \
s-stoele$(objext) \
s-stopoo$(objext) \
s-stratt$(objext) \
- s-strops$(objext) \
s-ststop$(objext) \
s-soflin$(objext) \
s-memory$(objext) \
type File_Type is new System.Direct_IO.File_Type;
Bytes : constant Interfaces.C_Streams.size_t :=
- Element_Type'Max_Size_In_Storage_Elements;
- -- Size of an element in storage units
+ Interfaces.C_Streams.size_t'Max
+ (1, Element_Type'Max_Size_In_Storage_Elements);
+ -- Size of an element in storage units. The Max operation here is to ensure
+ -- that we allocate a single byte for zero-sized elements. It's a bit weird
+ -- to instantiate Direct_IO with zero sized elements, but it is legal and
+ -- this adjustment ensures that we don't get anomolous behavior.
pragma Inline (Close);
pragma Inline (Create);
if With_Category > Unit_Category then
-- Special case: Remote_Types and Remote_Call_Interface are allowed
- -- to be with'ed in package body.
+ -- with anything in the package body, per (RM E.2(5)).
if (Unit_Category = Remote_Types
or else Unit_Category = Remote_Call_Interface)
and then Present (Etype (Orig_Node))
and then Is_Access_Type (Etype (Orig_Node))
then
- return Is_Variable_Prefix (Original_Node (Prefix (N)))
+ return
+ (Nkind (Orig_Node) = N_Function_Call
+ and then not Is_Access_Constant (Etype (Prefix (N))))
or else
- (Nkind (Orig_Node) = N_Function_Call
- and then not Is_Access_Constant (Etype (Prefix (N))));
+ Is_Variable_Prefix (Original_Node (Prefix (N)));
-- A function call is never a variable
-gnata ^ /CHECKS=ASSERTIONS
-gnatA ^ /NO_GNAT_ADC
-gnatb ^ /REPORT_ERRORS=BRIEF
+-gnatB ^ /ASSUME_VALID
-gnatc ^ /NOLOAD
-gnatdc ^ /TRACE_UNITS
-gnatdO ^ /REPORT_ERRORS=IMMEDIATE
-- filetype, instead of the object file. This may be useful if you need
-- to examine the generated assembly code.
+ S_GCC_AValid : aliased constant S := "/ASSUME_VALID " &
+ "-gnatB";
+ -- /NO_ASSUME_VALID (D)
+ -- /ASSUME_VALID
+ --
+ -- Use to tell the compiler to assume that all objects have valid values
+ -- except those occurring as prefixes to 'Valid attributes. In the default
+ -- mode, the compiler assumes that values may be invalid unless it can
+ -- be sure that they are valid, and code is generated to allow for this
+ -- possibility. The use of /ASSUME_VALID will improve the code.
+
S_GCC_Checks : aliased constant S := "/CHECKS=" &
"FULL " &
"-gnato,!-gnatE,!-gnatp " &
S_GCC_Ada_05 'Access,
S_GCC_Add 'Access,
S_GCC_Asm 'Access,
+ S_GCC_AValid 'Access,
S_GCC_Checks 'Access,
S_GCC_ChecksX 'Access,
S_GCC_Compres 'Access,