aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2013-04-24 15:04:40 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2013-04-24 15:04:40 +0200
commitdba44dbef91efd698ead6dcce7b19a24a4522000 (patch)
treed41774edc5e71ca4dd9eb0d1a97fbbbe701d2d1e /gcc/ada
parentca3e17b09114fea7ff08ed215ae79482ad16b706 (diff)
downloadgcc-dba44dbef91efd698ead6dcce7b19a24a4522000.zip
gcc-dba44dbef91efd698ead6dcce7b19a24a4522000.tar.gz
gcc-dba44dbef91efd698ead6dcce7b19a24a4522000.tar.bz2
[multiple changes]
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. From-SVN: r198223
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/ChangeLog14
-rw-r--r--gcc/ada/exp_ch13.adb9
-rw-r--r--gcc/ada/exp_ch9.adb1
-rw-r--r--gcc/ada/g-socket.adb4
-rw-r--r--gcc/ada/sem_ch13.adb4
-rw-r--r--gcc/ada/sem_ch3.adb4
-rw-r--r--gcc/ada/sem_prag.adb15
-rw-r--r--gcc/ada/sinfo.ads8
-rw-r--r--gcc/ada/vms_data.ads44
9 files changed, 73 insertions, 30 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 44f42f3..8353e50 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,17 @@
+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
diff --git a/gcc/ada/exp_ch13.adb b/gcc/ada/exp_ch13.adb
index d6525b2..24e5e39 100644
--- a/gcc/ada/exp_ch13.adb
+++ b/gcc/ada/exp_ch13.adb
@@ -567,19 +567,26 @@ package body Exp_Ch13 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;
diff --git a/gcc/ada/exp_ch9.adb b/gcc/ada/exp_ch9.adb
index 84b50ac..20a346c 100644
--- a/gcc/ada/exp_ch9.adb
+++ b/gcc/ada/exp_ch9.adb
@@ -1926,6 +1926,7 @@ package body Exp_Ch9 is
begin
P := Pre_Post_Conditions (Contract (E));
+
if No (P) then
return;
end if;
diff --git a/gcc/ada/g-socket.adb b/gcc/ada/g-socket.adb
index 04a4b86..87493d2 100644
--- a/gcc/ada/g-socket.adb
+++ b/gcc/ada/g-socket.adb
@@ -2221,10 +2221,8 @@ package body GNAT.Sockets is
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;
diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb
index b91dd89..40749ad 100644
--- a/gcc/ada/sem_ch13.adb
+++ b/gcc/ada/sem_ch13.adb
@@ -929,6 +929,8 @@ package body Sem_Ch13 is
-- 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 --
---------------------------
@@ -986,6 +988,8 @@ package body Sem_Ch13 is
-- 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
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb
index 079c0ec..3751ead 100644
--- a/gcc/ada/sem_ch3.adb
+++ b/gcc/ada/sem_ch3.adb
@@ -2223,6 +2223,7 @@ package body Sem_Ch3 is
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;
@@ -11530,7 +11531,8 @@ package body Sem_Ch3 is
-- 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)
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb
index 59d0858..80b316b 100644
--- a/gcc/ada/sem_prag.adb
+++ b/gcc/ada/sem_prag.adb
@@ -338,7 +338,8 @@ package body Sem_Prag is
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))));
@@ -6259,8 +6260,8 @@ package body Sem_Prag is
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)
@@ -8297,7 +8298,7 @@ package body Sem_Prag is
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
@@ -8352,11 +8353,13 @@ package body Sem_Prag is
-- 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 "
diff --git a/gcc/ada/sinfo.ads b/gcc/ada/sinfo.ads
index 5529bd5..04a64ab 100644
--- a/gcc/ada/sinfo.ads
+++ b/gcc/ada/sinfo.ads
@@ -7043,18 +7043,18 @@ package Sinfo is
-- 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 --
diff --git a/gcc/ada/vms_data.ads b/gcc/ada/vms_data.ads
index e2d9260..91ee51d 100644
--- a/gcc/ada/vms_data.ads
+++ b/gcc/ada/vms_data.ads
@@ -6,7 +6,7 @@
-- --
-- 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- --
@@ -4287,6 +4287,18 @@ package VMS_Data is
-- 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, ...)
@@ -4326,12 +4338,6 @@ package VMS_Data is
-- 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
@@ -4407,12 +4413,13 @@ package VMS_Data is
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,
@@ -6636,18 +6643,24 @@ package VMS_Data is
-- 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)
@@ -6667,8 +6680,9 @@ package VMS_Data is
(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);