+2013-04-24 Robert Dewar <dewar@adacore.com>
+
+ * exp_ch13.adb, sem_prag.adb: Update comments.
+ * sem_ch3.adb, exp_ch9.adb, g-socket.adb, sem_ch13.adb: Minor
+ reformatting.
+
+2013-04-24 Doug Rupp <rupp@adacore.com>
+
+ * vms_data.ads (/{NO}INHIBIT-EXEC): Document new default behavior.
+
+2013-04-24 Yannick Moy <moy@adacore.com>
+
+ * sinfo.ads: Minor correction of typo.
+
2013-04-24 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb: Create packed array only when expander is
then
declare
Prag : Node_Id;
+
begin
+ -- Comment this loop ???
+
Prag := Pre_Post_Conditions (Contract (E));
while Present (Prag) loop
Analyze_PPC_In_Decl_Part (Prag, E);
-
Prag := Next_Pragma (Prag);
end loop;
+ -- Why don't we do the same for Contract_Test_Cases ???
+
+ -- Comment this loop?
+
Prag := Classifications (Contract (E));
while Present (Prag) loop
if Pragma_Name (Prag) = Name_Depends then
Analyze_Depends_In_Decl_Part (Prag);
else
+ pragma Assert (Pragma_Name (Prag) = Name_Global);
Analyze_Global_In_Decl_Part (Prag);
end if;
begin
P := Pre_Post_Conditions (Contract (E));
+
if No (P) then
return;
end if;
Status : out Boolean)
is
function C_Set_Close_On_Exec
- (Socket : Socket_Type; Close_On_Exec : C.int)
- return C.int;
+ (Socket : Socket_Type; Close_On_Exec : C.int) return C.int;
pragma Import (C, C_Set_Close_On_Exec, "__gnat_set_close_on_exec");
-
begin
Status := C_Set_Close_On_Exec (Socket, Boolean'Pos (Close_On_Exec)) = 0;
end Set_Close_On_Exec;
-- Insert a postcondition-like pragma into the tree depending on the
-- context. Prag one of the following: Pre, Post, Depends or Global.
+ -- Why not also Contract_Cases ???
+
---------------------------
-- Insert_Delayed_Pragma --
---------------------------
-- Insert pragmas/attribute definition clause after this node when no
-- delayed analysis is required.
+ -- Start of processing for Analyze_Aspect_Specifications
+
-- The general processing involves building an attribute definition
-- clause or a pragma node that corresponds to the aspect. Then in order
-- to delay the evaluation of this aspect to the freeze point, we attach
if Pragma_Name (Prag) = Name_Depends then
Analyze_Depends_In_Decl_Part (Prag);
else
+ pragma Assert (Pragma_Name (Prag) = Name_Global);
Analyze_Global_In_Decl_Part (Prag);
end if;
-- If the component of the parent is packed, and the record type is
-- already frozen, as is the case for an itype, the component type
-- itself will not be frozen, and the packed array type for it must
- -- be constructed explicitly.
+ -- be constructed explicitly. Since the creation of packed types is
+ -- an expansion activity, we only do this if expansion is active.
if Expander_Active
and then Is_Packed (Compon_Type)
Get_Requires_From_CTC_Pragma (N),
Get_Ensures_From_CTC_Pragma (N));
- elsif Pragma_Name (N) = Name_Contract_Cases then
+ else
+ pragma Assert (Pragma_Name (N) = Name_Contract_Cases);
Analyze_Contract_Cases
(Expression (First (Pragma_Argument_Associations (N))));
end if;
end loop;
- -- When the convention is Java or CIL, we also allow Import to be
- -- given for packages, generic packages, exceptions, record
+ -- When the convention is Java or CIL, we also allow Import to
+ -- be given for packages, generic packages, exceptions, record
-- components, and access to subprograms.
elsif (C = Convention_Java or else C = Convention_CIL)
elsif Nkind (State) = N_Null then
Name := New_Internal_Name ('S');
- Is_Null := True;
+ Is_Null := True;
Null_Seen := True;
-- Catch a case where a null state appears in a list of
-- Volatile requires exactly one Input or Output
+ -- Isn't this just Input_Seen = Output_Seen ???
+
if Volatile_Seen
and then
- ((Input_Seen and then Output_Seen) -- both
+ ((Input_Seen and Output_Seen) -- both
or else
- (not Input_Seen and then not Output_Seen)) -- none
+ (not Input_Seen and not Output_Seen)) -- none
then
Error_Msg_N
("property Volatile requires exactly one Input or "
-- Classifications (Node3) (set to Empty if none)
-- Pre_Post_Conditions contains a collection of pragmas that correspond
- -- to pre- and post-conditions associated with an entry or a subprogram.
+ -- to pre- and postconditions associated with an entry or a subprogram.
-- The pragmas can either come from source or be the byproduct of aspect
- -- expansion. The ordering in the list is of LIFO fasion.
+ -- expansion. The ordering in the list is of LIFO fashion.
-- Contract_Test_Cases contains a collection of pragmas that correspond
-- to aspects/pragmas Contract_Cases and Test_Case. The ordering in the
- -- list is of LIFO fasion.
+ -- list is of LIFO fashion.
-- Classifications contains pragmas that either categorize subprogram
-- inputs and outputs or establish dependencies between them. Currently
-- pragmas Depends and Global are stored in this list. The ordering is
- -- of LIFO fasion.
+ -- of LIFO fashion.
-------------------
-- Expanded_Name --
-- --
-- S p e c --
-- --
--- Copyright (C) 1996-2012, Free Software Foundation, Inc. --
+-- Copyright (C) 1996-2013, 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- --
-- ification field in the image header. It overrides any pragma Ident
-- specified string.
+ S_Link_NoInhib : aliased constant S := "/NOINHIBIT-EXEC " &
+ "--for-linker=--noinhibit-exec";
+ -- /NOINHIBIT-EXEC (D)
+ --
+ -- Preserve executable if there are warnings. This is the default.
+
+ S_Link_Inhib : aliased constant S := "/INHIBIT-EXEC " &
+ "--for-linker=--inhibit-exec";
+ -- /INHIBIT-EXEC
+ --
+ -- Remove executable if there are warnings.
+
S_Link_Libdir : aliased constant S := "/LIBDIR=*" &
"-L*";
-- /LIBDIR=(directory, ...)
-- This may be used when a link is rerun with different options,
-- but there is no need to recompile the binder generated file.
- S_Link_Noinhib : aliased constant S := "/NOINHIBIT-EXEC " &
- "--for-linker=--noinhibit-exec";
- -- /NOINHIBIT-EXEC
- --
- -- Delete executable if there are errors or warnings.
-
S_Link_Nofiles : aliased constant S := "/NOSTART_FILES " &
"-nostartfiles";
-- /NOSTART_FILES
S_Link_Forlink 'Access,
S_Link_Force 'Access,
S_Link_Ident 'Access,
+ S_Link_NoInhib 'Access,
+ S_Link_Inhib 'Access,
S_Link_Libdir 'Access,
S_Link_Library 'Access,
S_Link_Mess 'Access,
S_Link_Nocomp 'Access,
S_Link_Nofiles 'Access,
- S_Link_Noinhib 'Access,
S_Link_Project 'Access,
S_Link_Return 'Access,
S_Link_Static 'Access,
-- ification field in the image header. It overrides any pragma Ident
-- specified string.
+ S_Shared_NoInhib : aliased constant S := "/NOINHIBIT-IMAGE " &
+ "--for-linker=--noinhibit-exec";
+ -- /NOINHIBIT-EXEC (D)
+ --
+ -- Preserve image if there are warnings. This is the default.
+
+ S_Shared_Inhib : aliased constant S := "/INHIBIT-IMAGE " &
+ "--for-linker=--inhibit-exec";
+ -- /INHIBIT-EXEC
+ --
+ -- Remove image if there are warnings.
+
S_Shared_Nofiles : aliased constant S := "/NOSTART_FILES " &
"-nostartfiles";
-- /NOSTART_FILES
--
-- Link in default image initialization and startup functions.
- S_Shared_Noinhib : aliased constant S := "/NOINHIBIT-IMAGE " &
- "--for-linker=--noinhibit-exec";
- -- /NOINHIBIT-IMAGE
- --
- -- Delete image if there are errors or warnings.
-
S_Shared_Verb : aliased constant S := "/VERBOSE " &
"-v";
-- /NOVERBOSE (D)
(S_Shared_Debug 'Access,
S_Shared_Image 'Access,
S_Shared_Ident 'Access,
+ S_Shared_NoInhib 'Access,
+ S_Shared_Inhib 'Access,
S_Shared_Nofiles 'Access,
- S_Shared_Noinhib 'Access,
S_Shared_Verb 'Access,
S_Shared_ZZZZZ 'Access);