aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2011-09-01 12:59:58 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2011-09-01 12:59:58 +0200
commitf503788621ee1fadc3bcd506f8939b3cd82d6876 (patch)
tree0d9edcd5120dd470ff8c1f523b5ecd692f338259
parent549e455803a0014098c187a65bc7e4ce783e8645 (diff)
downloadgcc-f503788621ee1fadc3bcd506f8939b3cd82d6876.zip
gcc-f503788621ee1fadc3bcd506f8939b3cd82d6876.tar.gz
gcc-f503788621ee1fadc3bcd506f8939b3cd82d6876.tar.bz2
[multiple changes]
2011-09-01 Yannick Moy <moy@adacore.com> * ali-util.adb, ali-util.ads (Read_Withed_ALIs): Add parameter Ignore_Errors to ignore failures to read ALI files when True. 2011-09-01 Javier Miranda <miranda@adacore.com> * exp_ch3.adb (Expand_N_Object_Declaration): Handle non-default constructor calls associated with non-tagged record types. 2011-09-01 Robert Dewar <dewar@adacore.com> * g-socthi-vms.adb: Minor reformatting. 2011-09-01 Nicolas Roche <roche@adacore.com> * sysdep.c: Don't use macro functions for stdio functions on VxWorks in order to avoid impact of imcompatible changes. * cstreams.c: Likewise * cio.c: Likewise * aux-io.c: Likewise 2011-09-01 Yannick Moy <moy@adacore.com> * lib-writ.adb (Write_With_Lines): Always output complete information on "with" line in Alfa mode, as this is required by formal verification back-end. From-SVN: r178406
-rw-r--r--gcc/ada/ChangeLog28
-rw-r--r--gcc/ada/ali-util.adb101
-rw-r--r--gcc/ada/ali-util.ads10
-rw-r--r--gcc/ada/aux-io.c12
-rw-r--r--gcc/ada/cio.c9
-rw-r--r--gcc/ada/cstreams.c10
-rw-r--r--gcc/ada/exp_ch3.adb10
-rw-r--r--gcc/ada/g-socthi-vms.adb5
-rw-r--r--gcc/ada/lib-writ.adb6
-rw-r--r--gcc/ada/sysdep.c12
10 files changed, 145 insertions, 58 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index a1dd898..dcd69b1 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,31 @@
+2011-09-01 Yannick Moy <moy@adacore.com>
+
+ * ali-util.adb, ali-util.ads (Read_Withed_ALIs): Add parameter
+ Ignore_Errors to ignore failures to read ALI files when True.
+
+2011-09-01 Javier Miranda <miranda@adacore.com>
+
+ * exp_ch3.adb (Expand_N_Object_Declaration): Handle non-default
+ constructor calls associated with non-tagged record types.
+
+2011-09-01 Robert Dewar <dewar@adacore.com>
+
+ * g-socthi-vms.adb: Minor reformatting.
+
+2011-09-01 Nicolas Roche <roche@adacore.com>
+
+ * sysdep.c: Don't use macro functions for stdio functions on VxWorks
+ in order to avoid impact of imcompatible changes.
+ * cstreams.c: Likewise
+ * cio.c: Likewise
+ * aux-io.c: Likewise
+
+2011-09-01 Yannick Moy <moy@adacore.com>
+
+ * lib-writ.adb (Write_With_Lines): Always output complete information
+ on "with" line in Alfa mode, as this is required by formal verification
+ back-end.
+
2011-09-01 Tristan Gingold <gingold@adacore.com>
* g-socthi-vms.adb: Add comments.
diff --git a/gcc/ada/ali-util.adb b/gcc/ada/ali-util.adb
index a040d30..0b43200 100644
--- a/gcc/ada/ali-util.adb
+++ b/gcc/ada/ali-util.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2010, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2011, 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- --
@@ -212,7 +212,10 @@ package body ALI.Util is
-- Read_Withed_ALIs --
----------------------
- procedure Read_Withed_ALIs (Id : ALI_Id) is
+ procedure Read_Withed_ALIs
+ (Id : ALI_Id;
+ Ignore_Errors : Boolean := False)
+ is
Afile : File_Name_Type;
Text : Text_Buffer_Ptr;
Idread : ALI_Id;
@@ -234,59 +237,67 @@ package body ALI.Util is
then
Text := Read_Library_Info (Afile);
- -- Return with an error if source cannot be found. We used to
- -- skip this check when we did not compile library generics
- -- separately, but we now always do, so there is no special
- -- case here anymore.
+ -- Unless Ignore_Errors is true, return with an error if source
+ -- cannot be found. We used to skip this check when we did not
+ -- compile library generics separately, but we now always do,
+ -- so there is no special case here anymore.
if Text = null then
- Error_Msg_File_1 := Afile;
- Error_Msg_File_2 := Withs.Table (W).Sfile;
- Error_Msg ("{ not found, { must be compiled");
- Set_Name_Table_Info (Afile, Int (No_Unit_Id));
- return;
- end if;
-
- -- Enter in ALIs table
- Idread :=
- Scan_ALI
- (F => Afile,
- T => Text,
- Ignore_ED => False,
- Err => False);
-
- Free (Text);
-
- if ALIs.Table (Idread).Compile_Errors then
- Error_Msg_File_1 := Withs.Table (W).Sfile;
- Error_Msg ("{ had errors, must be fixed, and recompiled");
- Set_Name_Table_Info (Afile, Int (No_Unit_Id));
+ if not Ignore_Errors then
+ Error_Msg_File_1 := Afile;
+ Error_Msg_File_2 := Withs.Table (W).Sfile;
+ Error_Msg ("{ not found, { must be compiled");
+ Set_Name_Table_Info (Afile, Int (No_Unit_Id));
+ return;
+ end if;
- elsif ALIs.Table (Idread).No_Object then
- Error_Msg_File_1 := Withs.Table (W).Sfile;
- Error_Msg ("{ must be recompiled");
- Set_Name_Table_Info (Afile, Int (No_Unit_Id));
- end if;
+ else
+ -- Enter in ALIs table
+
+ Idread :=
+ Scan_ALI
+ (F => Afile,
+ T => Text,
+ Ignore_ED => False,
+ Err => False);
+
+ Free (Text);
+
+ if ALIs.Table (Idread).Compile_Errors
+ and then not Ignore_Errors
+ then
+ Error_Msg_File_1 := Withs.Table (W).Sfile;
+ Error_Msg ("{ had errors, must be fixed, and recompiled");
+ Set_Name_Table_Info (Afile, Int (No_Unit_Id));
+
+ elsif ALIs.Table (Idread).No_Object
+ and then not Ignore_Errors
+ then
+ Error_Msg_File_1 := Withs.Table (W).Sfile;
+ Error_Msg ("{ must be recompiled");
+ Set_Name_Table_Info (Afile, Int (No_Unit_Id));
+ end if;
- -- If the Unit is an Interface to a Stand-Alone Library,
- -- set the Interface flag in the Withs table, so that its
- -- dependant are not considered for elaboration order.
+ -- If the Unit is an Interface to a Stand-Alone Library,
+ -- set the Interface flag in the Withs table, so that its
+ -- dependant are not considered for elaboration order.
- if ALIs.Table (Idread).SAL_Interface then
- Withs.Table (W).SAL_Interface := True;
- Interface_Library_Unit := True;
+ if ALIs.Table (Idread).SAL_Interface then
+ Withs.Table (W).SAL_Interface := True;
+ Interface_Library_Unit := True;
- -- Set the entry in the Interfaces hash table, so that other
- -- units that import this unit will set the flag in their
- -- entry in the Withs table.
+ -- Set the entry in the Interfaces hash table, so that
+ -- other units that import this unit will set the flag
+ -- in their entry in the Withs table.
- Interfaces.Set (Afile, True);
+ Interfaces.Set (Afile, True);
- else
- -- Otherwise, recurse to get new dependents
+ else
+ -- Otherwise, recurse to get new dependents
- Read_Withed_ALIs (Idread);
+ Read_Withed_ALIs (Idread);
+ end if;
end if;
-- If the ALI file has already been processed and is an interface,
diff --git a/gcc/ada/ali-util.ads b/gcc/ada/ali-util.ads
index cbdb14f..707fec7 100644
--- a/gcc/ada/ali-util.ads
+++ b/gcc/ada/ali-util.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2010, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2011, 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- --
@@ -100,11 +100,15 @@ package ALI.Util is
-- Subprograms for Manipulating ALI Information --
--------------------------------------------------
- procedure Read_Withed_ALIs (Id : ALI_Id);
+ procedure Read_Withed_ALIs
+ (Id : ALI_Id;
+ Ignore_Errors : Boolean := False);
-- Process an ALI file which has been read and scanned by looping through
-- all withed units in the ALI file, checking if they have been processed.
-- Each unit that has not yet been processed will be read, scanned, and
- -- processed recursively.
+ -- processed recursively. If Ignore_Errors is True, then failure to read an
+ -- ALI file is not reported as an error, and scanning continues with other
+ -- ALI files.
procedure Set_Source_Table (A : ALI_Id);
-- Build source table entry corresponding to the ALI file whose id is A
diff --git a/gcc/ada/aux-io.c b/gcc/ada/aux-io.c
index a7ab20b..6ff415d 100644
--- a/gcc/ada/aux-io.c
+++ b/gcc/ada/aux-io.c
@@ -6,7 +6,7 @@
* *
* C Implementation File *
* *
- * Copyright (C) 1992-2009 Free Software Foundation, Inc. *
+ * Copyright (C) 1992-2011, 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- *
@@ -39,6 +39,16 @@
#include "system.h"
#endif
+/* Don't use macros versions of this functions on VxWorks since they cause
+ imcompatible changes in some VxWorks versions */
+#ifdef __vxworks
+#undef getchar
+#undef putchar
+#undef feof
+#undef ferror
+#undef fileno
+#endif
+
/* Function wrappers are needed to access the values from Ada which are
defined as C macros. */
diff --git a/gcc/ada/cio.c b/gcc/ada/cio.c
index 73e5427..2564e4d 100644
--- a/gcc/ada/cio.c
+++ b/gcc/ada/cio.c
@@ -54,9 +54,14 @@ extern "C" {
#undef stdout
#endif
-#ifdef VTHREADS
-#undef putchar
+/* Don't use macros versions of this functions on VxWorks since they cause
+ imcompatible changes in some VxWorks versions */
+#ifdef __vxworks
#undef getchar
+#undef putchar
+#undef feof
+#undef ferror
+#undef fileno
#endif
#ifdef RTX
diff --git a/gcc/ada/cstreams.c b/gcc/ada/cstreams.c
index 3477cf4..9b2e9b2 100644
--- a/gcc/ada/cstreams.c
+++ b/gcc/ada/cstreams.c
@@ -70,6 +70,16 @@ extern "C" {
#endif
+/* Don't use macros versions of this functions on VxWorks since they cause
+ imcompatible changes in some VxWorks versions */
+#ifdef __vxworks
+#undef getchar
+#undef putchar
+#undef feof
+#undef ferror
+#undef fileno
+#endif
+
/* The _IONBF value in MINGW32 stdio.h is wrong. */
#if defined (WINNT) || defined (_WINNT)
#if OLD_MINGW
diff --git a/gcc/ada/exp_ch3.adb b/gcc/ada/exp_ch3.adb
index 338dad1..464fdef 100644
--- a/gcc/ada/exp_ch3.adb
+++ b/gcc/ada/exp_ch3.adb
@@ -5129,9 +5129,13 @@ package body Exp_Ch3 is
Loc))));
end;
- elsif Is_Tagged_Type (Typ)
- and then Is_CPP_Constructor_Call (Expr)
- then
+ -- Handle C++ constructor calls. Note that we do not check that
+ -- Typ is a tagged type since the equivalent Ada type of a C++
+ -- class that has no virtual methods is a non-tagged limited
+ -- record type.
+
+ elsif Is_CPP_Constructor_Call (Expr) then
+
-- The call to the initialization procedure does NOT freeze the
-- object being initialized.
diff --git a/gcc/ada/g-socthi-vms.adb b/gcc/ada/g-socthi-vms.adb
index 6addd56..c075ae5 100644
--- a/gcc/ada/g-socthi-vms.adb
+++ b/gcc/ada/g-socthi-vms.adb
@@ -41,9 +41,8 @@ package body GNAT.Sockets.Thin is
type VMS_Msghdr is new Msghdr;
pragma Pack (VMS_Msghdr);
-- On VMS 8.x (unlike other platforms), struct msghdr is packed, so a
- -- specific derived type is required.
- -- This structure was not packed on VMS 7.3, so sendmsg and recvmsg fail on
- -- earlier VMS versions.
+ -- specific derived type is required. This structure was not packed on
+ -- VMS 7.3, so sendmsg and recvmsg fail on earlier VMS versions.
Non_Blocking_Sockets : aliased Fd_Set;
-- When this package is initialized with Process_Blocking_IO set to True,
diff --git a/gcc/ada/lib-writ.adb b/gcc/ada/lib-writ.adb
index bd236ea..c8129e9 100644
--- a/gcc/ada/lib-writ.adb
+++ b/gcc/ada/lib-writ.adb
@@ -796,6 +796,12 @@ package body Lib.Writ is
or else
Nkind (Unit (Cunit)) in N_Generic_Renaming_Declaration)
and then Generic_May_Lack_ALI (Fname))
+
+ -- In Alfa mode, always generate the dependencies on ALI
+ -- files, which are required to compute frame conditions
+ -- of subprograms.
+
+ or else Alfa_Mode
then
Write_Info_Tab (25);
diff --git a/gcc/ada/sysdep.c b/gcc/ada/sysdep.c
index aee200a..af05a91 100644
--- a/gcc/ada/sysdep.c
+++ b/gcc/ada/sysdep.c
@@ -6,7 +6,7 @@
* *
* C Implementation File *
* *
- * Copyright (C) 1992-2010, Free Software Foundation, Inc. *
+ * Copyright (C) 1992-2011, 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- *
@@ -69,6 +69,16 @@ extern struct tm *localtime_r(const time_t *, struct tm *);
#include "adaint.h"
+/* Don't use macros versions of this functions on VxWorks since they cause
+ imcompatible changes in some VxWorks versions */
+#ifdef __vxworks
+#undef getchar
+#undef putchar
+#undef feof
+#undef ferror
+#undef fileno
+#endif
+
/*
mode_read_text
open text file for reading