Commit f5037886 by Arnaud Charlet

[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
parent 549e4558
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> 2011-09-01 Tristan Gingold <gingold@adacore.com>
* g-socthi-vms.adb: Add comments. * g-socthi-vms.adb: Add comments.
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- 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 -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -212,7 +212,10 @@ package body ALI.Util is ...@@ -212,7 +212,10 @@ package body ALI.Util is
-- Read_Withed_ALIs -- -- 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; Afile : File_Name_Type;
Text : Text_Buffer_Ptr; Text : Text_Buffer_Ptr;
Idread : ALI_Id; Idread : ALI_Id;
...@@ -234,59 +237,67 @@ package body ALI.Util is ...@@ -234,59 +237,67 @@ package body ALI.Util is
then then
Text := Read_Library_Info (Afile); Text := Read_Library_Info (Afile);
-- Return with an error if source cannot be found. We used to -- Unless Ignore_Errors is true, return with an error if source
-- skip this check when we did not compile library generics -- cannot be found. We used to skip this check when we did not
-- separately, but we now always do, so there is no special -- compile library generics separately, but we now always do,
-- case here anymore. -- so there is no special case here anymore.
if Text = null then 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 := if not Ignore_Errors then
Scan_ALI Error_Msg_File_1 := Afile;
(F => Afile, Error_Msg_File_2 := Withs.Table (W).Sfile;
T => Text, Error_Msg ("{ not found, { must be compiled");
Ignore_ED => False, Set_Name_Table_Info (Afile, Int (No_Unit_Id));
Err => False); return;
end if;
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));
elsif ALIs.Table (Idread).No_Object then else
Error_Msg_File_1 := Withs.Table (W).Sfile; -- Enter in ALIs table
Error_Msg ("{ must be recompiled");
Set_Name_Table_Info (Afile, Int (No_Unit_Id)); Idread :=
end if; 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, -- If the Unit is an Interface to a Stand-Alone Library,
-- set the Interface flag in the Withs table, so that its -- set the Interface flag in the Withs table, so that its
-- dependant are not considered for elaboration order. -- dependant are not considered for elaboration order.
if ALIs.Table (Idread).SAL_Interface then if ALIs.Table (Idread).SAL_Interface then
Withs.Table (W).SAL_Interface := True; Withs.Table (W).SAL_Interface := True;
Interface_Library_Unit := True; Interface_Library_Unit := True;
-- Set the entry in the Interfaces hash table, so that other -- Set the entry in the Interfaces hash table, so that
-- units that import this unit will set the flag in their -- other units that import this unit will set the flag
-- entry in the Withs table. -- in their entry in the Withs table.
Interfaces.Set (Afile, True); Interfaces.Set (Afile, True);
else else
-- Otherwise, recurse to get new dependents -- Otherwise, recurse to get new dependents
Read_Withed_ALIs (Idread); Read_Withed_ALIs (Idread);
end if;
end if; end if;
-- If the ALI file has already been processed and is an interface, -- If the ALI file has already been processed and is an interface,
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- 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 -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -100,11 +100,15 @@ package ALI.Util is ...@@ -100,11 +100,15 @@ package ALI.Util is
-- Subprograms for Manipulating ALI Information -- -- 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 -- 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. -- 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 -- 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); procedure Set_Source_Table (A : ALI_Id);
-- Build source table entry corresponding to the ALI file whose id is A -- Build source table entry corresponding to the ALI file whose id is A
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* * * *
* C Implementation File * * 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 * * 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- * * terms of the GNU General Public License as published by the Free Soft- *
...@@ -39,6 +39,16 @@ ...@@ -39,6 +39,16 @@
#include "system.h" #include "system.h"
#endif #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 /* Function wrappers are needed to access the values from Ada which are
defined as C macros. */ defined as C macros. */
......
...@@ -54,9 +54,14 @@ extern "C" { ...@@ -54,9 +54,14 @@ extern "C" {
#undef stdout #undef stdout
#endif #endif
#ifdef VTHREADS /* Don't use macros versions of this functions on VxWorks since they cause
#undef putchar imcompatible changes in some VxWorks versions */
#ifdef __vxworks
#undef getchar #undef getchar
#undef putchar
#undef feof
#undef ferror
#undef fileno
#endif #endif
#ifdef RTX #ifdef RTX
......
...@@ -70,6 +70,16 @@ extern "C" { ...@@ -70,6 +70,16 @@ extern "C" {
#endif #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. */ /* The _IONBF value in MINGW32 stdio.h is wrong. */
#if defined (WINNT) || defined (_WINNT) #if defined (WINNT) || defined (_WINNT)
#if OLD_MINGW #if OLD_MINGW
......
...@@ -5129,9 +5129,13 @@ package body Exp_Ch3 is ...@@ -5129,9 +5129,13 @@ package body Exp_Ch3 is
Loc)))); Loc))));
end; end;
elsif Is_Tagged_Type (Typ) -- Handle C++ constructor calls. Note that we do not check that
and then Is_CPP_Constructor_Call (Expr) -- Typ is a tagged type since the equivalent Ada type of a C++
then -- 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 -- The call to the initialization procedure does NOT freeze the
-- object being initialized. -- object being initialized.
......
...@@ -41,9 +41,8 @@ package body GNAT.Sockets.Thin is ...@@ -41,9 +41,8 @@ package body GNAT.Sockets.Thin is
type VMS_Msghdr is new Msghdr; type VMS_Msghdr is new Msghdr;
pragma Pack (VMS_Msghdr); pragma Pack (VMS_Msghdr);
-- On VMS 8.x (unlike other platforms), struct msghdr is packed, so a -- On VMS 8.x (unlike other platforms), struct msghdr is packed, so a
-- specific derived type is required. -- specific derived type is required. This structure was not packed on
-- This structure was not packed on VMS 7.3, so sendmsg and recvmsg fail on -- VMS 7.3, so sendmsg and recvmsg fail on earlier VMS versions.
-- earlier VMS versions.
Non_Blocking_Sockets : aliased Fd_Set; Non_Blocking_Sockets : aliased Fd_Set;
-- When this package is initialized with Process_Blocking_IO set to True, -- When this package is initialized with Process_Blocking_IO set to True,
......
...@@ -796,6 +796,12 @@ package body Lib.Writ is ...@@ -796,6 +796,12 @@ package body Lib.Writ is
or else or else
Nkind (Unit (Cunit)) in N_Generic_Renaming_Declaration) Nkind (Unit (Cunit)) in N_Generic_Renaming_Declaration)
and then Generic_May_Lack_ALI (Fname)) 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 then
Write_Info_Tab (25); Write_Info_Tab (25);
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* * * *
* C Implementation File * * 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 * * 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- * * 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 *); ...@@ -69,6 +69,16 @@ extern struct tm *localtime_r(const time_t *, struct tm *);
#include "adaint.h" #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 mode_read_text
open text file for reading open text file for reading
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment