Commit b3c33641 by Arnaud Charlet

[multiple changes]

2011-10-24  Robert Dewar  <dewar@adacore.com>

	* sem.adb (Initialize): Fix bug that blew up if called a second
	time.

2011-10-24  Robert Dewar  <dewar@adacore.com>

	* tb-alvxw.c, tracebak.c, expect.c, initflt.c, tb-alvms.c,
	tb-ivms.c, tb-gcc.c: Update headers to GPL 3.

2011-10-24  Robert Dewar  <dewar@adacore.com>

	* sem_prag.adb (Analyze_Pragma, case Debug): Give proper pragma
	name in error msg.

2011-10-24  Hristian Kirtchev  <kirtchev@adacore.com>

	* gnat_rm.texi Add an entry for restriction No_Finalization.

2011-10-24  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch12.adb (Insert_Freeze_Node_For_Instance):  If the
	current instance is within the one that contains the generic,
	the freeze node for the current one must appear in the current
	declarative part. Ditto if the current instance is within another
	package instance. In both of these cases the freeze node of the
	previous instance is not relevant.

2011-10-24  Gary Dismukes  <dismukes@adacore.com>

	* switch-m.adb (Normalize_Compiler_Switches): Add recognition
	of AAMP-specific switches -univ and -aamp_target.

2011-10-24  Robert Dewar  <dewar@adacore.com>

	* a-tienau.adb (Put): Deal properly with limited line length.

2011-10-24  Robert Dewar  <dewar@adacore.com>

	* sem_warn.adb, sem_ch12.adb: Minor reformatting.

From-SVN: r180375
parent 8263e17a
2011-10-24 Robert Dewar <dewar@adacore.com>
* sem.adb (Initialize): Fix bug that blew up if called a second
time.
2011-10-24 Robert Dewar <dewar@adacore.com>
* tb-alvxw.c, tracebak.c, expect.c, initflt.c, tb-alvms.c,
tb-ivms.c, tb-gcc.c: Update headers to GPL 3.
2011-10-24 Robert Dewar <dewar@adacore.com>
* sem_prag.adb (Analyze_Pragma, case Debug): Give proper pragma
name in error msg.
2011-10-24 Hristian Kirtchev <kirtchev@adacore.com>
* gnat_rm.texi Add an entry for restriction No_Finalization.
2011-10-24 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb (Insert_Freeze_Node_For_Instance): If the
current instance is within the one that contains the generic,
the freeze node for the current one must appear in the current
declarative part. Ditto if the current instance is within another
package instance. In both of these cases the freeze node of the
previous instance is not relevant.
2011-10-24 Gary Dismukes <dismukes@adacore.com>
* switch-m.adb (Normalize_Compiler_Switches): Add recognition
of AAMP-specific switches -univ and -aamp_target.
2011-10-24 Robert Dewar <dewar@adacore.com>
* a-tienau.adb (Put): Deal properly with limited line length.
2011-10-24 Robert Dewar <dewar@adacore.com>
* sem_warn.adb, sem_ch12.adb: Minor reformatting.
2011-10-16 Tristan Gingold <gingold@adacore.com>
* gcc-interface/Makefile.in: Use GNU ld switches to generate map files
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- 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- --
......@@ -126,6 +126,25 @@ package body Ada.Text_IO.Enumeration_Aux is
Actual_Width : constant Count := Count'Max (Count (Width), Item'Length);
begin
-- Deal with limited line length
if Line_Length /= 0 then
-- If actual width exceeds line length, raise Layout_Error
if Actual_Width > Line_Length then
raise Layout_Error;
end if;
-- If full width cannot fit on current line move to new line
if Actual_Width + (Col - 1) > Line_Length then
New_Line (File);
end if;
end if;
-- Output in lower case if necessary
if Set = Lower_Case and then Item (Item'First) /= ''' then
declare
Iteml : String (Item'First .. Item'Last);
......@@ -138,10 +157,14 @@ package body Ada.Text_IO.Enumeration_Aux is
Put_Item (File, Iteml);
end;
-- Otherwise output in upper case
else
Put_Item (File, Item);
end if;
-- Fill out item with spaces to width
for J in 1 .. Actual_Width - Item'Length loop
Put (File, ' ');
end loop;
......
/****************************************************************************
* *
* GNAT COMPILER COMPONENTS *
* GNAT RUN-TIME COMPONENTS *
* *
* E X P E C T *
* *
* C Implementation File *
* *
* Copyright (C) 2001-2009, AdaCore *
* Copyright (C) 2001-2011, AdaCore *
* *
* 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- *
* ware Foundation; either version 2, or (at your option) any later ver- *
* ware Foundation; either version 3, or (at your option) any later ver- *
* sion. GNAT is distributed in the hope that it will be useful, but WITH- *
* OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License *
* for more details. You should have received a copy of the GNU General *
* Public License distributed with GNAT; see file COPYING. If not, write *
* to the Free Software Foundation, 51 Franklin Street, Fifth Floor, *
* Boston, MA 02110-1301, USA. *
* or FITNESS FOR A PARTICULAR PURPOSE. *
* *
* As a special exception, if you link this file with other files to *
* produce an executable, this file does not by itself cause the resulting *
* executable to be covered by the GNU General Public License. This except- *
* ion does not however invalidate any other reasons why the executable *
* file might be covered by the GNU Public License. *
* As a special exception under Section 7 of GPL version 3, you are granted *
* additional permissions described in the GCC Runtime Library Exception, *
* version 3.1, as published by the Free Software Foundation. *
* *
* You should have received a copy of the GNU General Public License and *
* a copy of the GCC Runtime Library Exception along with this program; *
* see the files COPYING3 and COPYING.RUNTIME respectively. If not, see *
* <http://www.gnu.org/licenses/>. *
* *
* GNAT was originally developed by the GNAT team at New York University. *
* Extensive contributions were provided by Ada Core Technologies Inc. *
......
......@@ -9016,6 +9016,32 @@ in a distributed environment. If this exception is active, then the generated
code is simplified by omitting the otherwise-required global registration
of exceptions when they are declared.
@item No_Finalization
@findex No_Finalization
This restriction disables the language features described in chapter 7.6 of the
Ada 2005 RM as well as all form of code generation performed by the compiler to
support these features. The following types are no longer considered controlled
when this restriction is in effect:
@itemize @bullet
@item
@code{Ada.Finalization.Controlled}
@item
@code{Ada.Finalization.Limited_Controlled}
@item
Derivations from @code{Controlled} or @code{Limited_Controlled}
@item
Class-wide types
@item
Protected types
@item
Task types
@item
Array and record types with controlled components
@end itemize
The compiler no longer generates code to initialize, finalize or adjust an
object or a nested component, either declared on the stack or on the heap. The
deallocation of a controlled object no longer finalizes its contents.
@item No_Implicit_Aliasing
@findex No_Implicit_Aliasing
......
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . O S _ I N T E R F A C E --
-- --
-- S p e c --
-- --
-- Copyright (C) 1991-1994, Florida State University --
-- Copyright (C) 1995-2008, Free Software Foundation, Inc. --
-- Copyright (C) 1995-2011, Free Software Foundation, Inc. --
-- --
-- GNARL 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- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNARL is distributed in the hope that it will be useful, but WITH- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNARL; see file COPYING. If not, write --
-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
-- Boston, MA 02110-1301, USA. --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself cause the resulting executable to be --
-- covered by the GNU General Public License. This exception does not --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- GNARL was developed by the GNARL team at Florida State University. --
-- Extensive contributions were provided by Ada Core Technologies, Inc. --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
......
......@@ -845,11 +845,9 @@ package body Sem is
return;
end if;
-- First search the local entity suppress stack, we search this in
-- reverse order so that we get the innermost entry that applies to
-- this case if there are nested entries. Note that for the purpose
-- of this procedure we are ONLY looking for entries corresponding
-- to a two-argument Suppress, where the second argument matches From.
-- First search the global entity suppress table for a matching entry.
-- We also search this in reverse order so that if there are multiple
-- pragmas for the same entity, the last one applies.
Search_Stack (Global_Suppress_Stack_Top, Found);
......@@ -857,9 +855,11 @@ package body Sem is
return;
end if;
-- Now search the global entity suppress table for a matching entry.
-- We also search this in reverse order so that if there are multiple
-- pragmas for the same entity, the last one applies.
-- Now search the local entity suppress stack, we search this in
-- reverse order so that we get the innermost entry that applies to
-- this case if there are nested entries. Note that for the purpose
-- of this procedure we are ONLY looking for entries corresponding
-- to a two-argument Suppress, where the second argument matches From.
Search_Stack (Local_Suppress_Stack_Top, Found);
end Copy_Suppress_Status;
......@@ -936,7 +936,6 @@ package body Sem is
else
Scop := Scope (E);
while Present (Scop) loop
if Scop = Outer_Generic_Scope then
return False;
......@@ -966,7 +965,7 @@ package body Sem is
-- of the compiler (in the normal case this loop does nothing).
while Suppress_Stack_Entries /= null loop
Next := Global_Suppress_Stack_Top.Next;
Next := Suppress_Stack_Entries.Next;
Free (Suppress_Stack_Entries);
Suppress_Stack_Entries := Next;
end loop;
......
......@@ -7517,7 +7517,8 @@ package body Sem_Ch12 is
Decl := N;
-- If this is a package instance, check whether the generic is
-- declared in a previous instance.
-- declared in a previous instance and the current instance is
-- not within the previous one.
if Present (Generic_Parent (Parent (Inst)))
and then Is_In_Main_Unit (N)
......@@ -7525,13 +7526,45 @@ package body Sem_Ch12 is
declare
Par_I : constant Entity_Id :=
Previous_Instance (Generic_Parent (Parent (Inst)));
Scop : Entity_Id;
begin
if Present (Par_I)
and then Earlier (N, Freeze_Node (Par_I))
then
Insert_After (Freeze_Node (Par_I), F_Node);
return;
Scop := Scope (Inst);
-- If the current instance is within the one that contains
-- the generic, the freeze node for the current one must
-- appear in the current declarative part. Ditto, if the
-- current instance is within another package instance. In
-- both of these cases the freeze node of the previous
-- instance is not relevant.
while Present (Scop)
and then Scop /= Standard_Standard
loop
exit when Scop = Par_I
or else Is_Generic_Instance (Scop);
Scop := Scope (Scop);
end loop;
if Scop = Par_I then
-- Previous instance encloses current instance
null;
elsif Is_Generic_Instance (Scop) then
-- Current instance is within an unrelated instance
null;
else
Insert_After (Freeze_Node (Par_I), F_Node);
return;
end if;
end if;
end;
end if;
......
......@@ -7884,7 +7884,8 @@ package body Sem_Prag is
-- All other cases: diagnose error
Error_Msg
("argument of pragma% is not procedure call", Sloc (Call));
("argument of pragma ""Debug"" is not procedure call",
Sloc (Call));
return;
end if;
......
......@@ -1407,7 +1407,7 @@ package body Sem_Warn is
-- Case of warning on any unread OUT parameter (note
-- such indications are only set if the appropriate
-- warning options were set, so no need to recheck here.
-- warning options were set, so no need to recheck here.)
or else
Referenced_As_Out_Parameter_Check_Spec (E1))
......
......@@ -196,6 +196,24 @@ package body Switch.M is
Add_Switch_Component ("-mrtp");
end if;
-- Switch for universal addressing on AAMP target
elsif Switch_Chars'Length >= 5
and then
Switch_Chars
(Switch_Chars'First .. Switch_Chars'First + 4) = "-univ"
then
Add_Switch_Component (Switch_Chars);
-- Switch for specifying AAMP target library
elsif Switch_Chars'Length > 13
and then
Switch_Chars (Switch_Chars'First .. Switch_Chars'First + 12)
= "-aamp_target="
then
Add_Switch_Component (Switch_Chars);
-- Take only into account switches that are transmitted to
-- gnat1 by the gcc driver and stored by gnat1 in the ALI file.
......
/****************************************************************************
* *
* GNAT COMPILER COMPONENTS *
* GNAT RUN-TIME COMPONENTS *
* *
* T R A C E B A C K - A l p h a / V M S *
* *
* C Implementation File *
* *
* Copyright (C) 2003-2007, AdaCore *
* Copyright (C) 2003-2011, AdaCore *
* *
* 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- *
* ware Foundation; either version 2, or (at your option) any later ver- *
* ware Foundation; either version 3, or (at your option) any later ver- *
* sion. GNAT is distributed in the hope that it will be useful, but WITH- *
* OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License *
* for more details. You should have received a copy of the GNU General *
* Public License distributed with GNAT; see file COPYING. If not, write *
* to the Free Software Foundation, 51 Franklin Street, Fifth Floor, *
* Boston, MA 02110-1301, USA. *
* or FITNESS FOR A PARTICULAR PURPOSE. *
* *
* As a special exception, if you link this file with other files to *
* produce an executable, this file does not by itself cause the resulting *
* executable to be covered by the GNU General Public License. This except- *
* ion does not however invalidate any other reasons why the executable *
* file might be covered by the GNU Public License. *
* As a special exception under Section 7 of GPL version 3, you are granted *
* additional permissions described in the GCC Runtime Library Exception, *
* version 3.1, as published by the Free Software Foundation. *
* *
* You should have received a copy of the GNU General Public License and *
* a copy of the GCC Runtime Library Exception along with this program; *
* see the files COPYING3 and COPYING.RUNTIME respectively. If not, see *
* <http://www.gnu.org/licenses/>. *
* *
* GNAT was originally developed by the GNAT team at New York University. *
* Extensive contributions were provided by Ada Core Technologies Inc. *
......
/****************************************************************************
* *
* GNAT COMPILER COMPONENTS *
* GNAT RUN-TIME COMPONENTS *
* *
* T R A C E B A C K - A l p h a / V x W o r k s *
* *
* C Implementation File *
* *
* Copyright (C) 2000-2006, AdaCore *
* Copyright (C) 2000-2011, AdaCore *
* *
* 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- *
* ware Foundation; either version 2, or (at your option) any later ver- *
* ware Foundation; either version 3, or (at your option) any later ver- *
* sion. GNAT is distributed in the hope that it will be useful, but WITH- *
* OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License *
* for more details. You should have received a copy of the GNU General *
* Public License distributed with GNAT; see file COPYING. If not, write *
* to the Free Software Foundation, 51 Franklin Street, Fifth Floor, *
* Boston, MA 02110-1301, USA. *
* or FITNESS FOR A PARTICULAR PURPOSE. *
* *
* As a special exception, if you link this file with other files to *
* produce an executable, this file does not by itself cause the resulting *
* executable to be covered by the GNU General Public License. This except- *
* ion does not however invalidate any other reasons why the executable *
* file might be covered by the GNU Public License. *
* As a special exception under Section 7 of GPL version 3, you are granted *
* additional permissions described in the GCC Runtime Library Exception, *
* version 3.1, as published by the Free Software Foundation. *
* *
* You should have received a copy of the GNU General Public License and *
* a copy of the GCC Runtime Library Exception along with this program; *
* see the files COPYING3 and COPYING.RUNTIME respectively. If not, see *
* <http://www.gnu.org/licenses/>. *
* *
* GNAT was originally developed by the GNAT team at New York University. *
* Extensive contributions were provided by Ada Core Technologies Inc. *
......
/****************************************************************************
* *
* GNAT COMPILER COMPONENTS *
* GNAT RUN-TIME COMPONENTS *
* *
* T R A C E B A C K - G C C t a b l e s *
* *
* C Implementation File *
* *
* Copyright (C) 2004-2009, Free Software Foundation, Inc. *
* Copyright (C) 2004-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- *
* ware Foundation; either version 2, or (at your option) any later ver- *
* ware Foundation; either version 3, or (at your option) any later ver- *
* sion. GNAT is distributed in the hope that it will be useful, but WITH- *
* OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License *
* for more details. You should have received a copy of the GNU General *
* Public License distributed with GNAT; see file COPYING. If not, write *
* to the Free Software Foundation, 51 Franklin Street, Fifth Floor, *
* Boston, MA 02110-1301, USA. *
* or FITNESS FOR A PARTICULAR PURPOSE. *
* *
* As a special exception, if you link this file with other files to *
* produce an executable, this file does not by itself cause the resulting *
* executable to be covered by the GNU General Public License. This except- *
* ion does not however invalidate any other reasons why the executable *
* file might be covered by the GNU Public License. *
* As a special exception under Section 7 of GPL version 3, you are granted *
* additional permissions described in the GCC Runtime Library Exception, *
* version 3.1, as published by the Free Software Foundation. *
* *
* You should have received a copy of the GNU General Public License and *
* a copy of the GCC Runtime Library Exception along with this program; *
* see the files COPYING3 and COPYING.RUNTIME respectively. If not, see *
* <http://www.gnu.org/licenses/>. *
* *
* GNAT was originally developed by the GNAT team at New York University. *
* Extensive contributions were provided by Ada Core Technologies Inc. *
......
/****************************************************************************
* *
* GNAT COMPILER COMPONENTS *
* GNAT RUN-TIME COMPONENTS *
* *
* T R A C E B A C K - I t a n i u m / V M S *
* *
* C Implementation File *
* *
* Copyright (C) 2007, AdaCore *
* Copyright (C) 2007-2011, AdaCore *
* *
* 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- *
* ware Foundation; either version 2, or (at your option) any later ver- *
* ware Foundation; either version 3, or (at your option) any later ver- *
* sion. GNAT is distributed in the hope that it will be useful, but WITH- *
* OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License *
* for more details. You should have received a copy of the GNU General *
* Public License distributed with GNAT; see file COPYING. If not, write *
* to the Free Software Foundation, 51 Franklin Street, Fifth Floor, *
* Boston, MA 02110-1301, USA. *
* or FITNESS FOR A PARTICULAR PURPOSE. *
* *
* As a special exception, if you link this file with other files to *
* produce an executable, this file does not by itself cause the resulting *
* executable to be covered by the GNU General Public License. This except- *
* ion does not however invalidate any other reasons why the executable *
* file might be covered by the GNU Public License. *
* As a special exception under Section 7 of GPL version 3, you are granted *
* additional permissions described in the GCC Runtime Library Exception, *
* version 3.1, as published by the Free Software Foundation. *
* *
* You should have received a copy of the GNU General Public License and *
* a copy of the GCC Runtime Library Exception along with this program; *
* see the files COPYING3 and COPYING.RUNTIME respectively. If not, see *
* <http://www.gnu.org/licenses/>. *
* *
* GNAT was originally developed by the GNAT team at New York University. *
* Extensive contributions were provided by Ada Core Technologies Inc. *
......
/****************************************************************************
* *
* GNAT COMPILER COMPONENTS *
* GNAT RUN-TIME COMPONENTS *
* *
* T R A C E B A C K *
* *
......@@ -10,20 +10,19 @@
* *
* 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- *
* ware Foundation; either version 2, or (at your option) any later ver- *
* ware Foundation; either version 3, or (at your option) any later ver- *
* sion. GNAT is distributed in the hope that it will be useful, but WITH- *
* OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License *
* for more details. You should have received a copy of the GNU General *
* Public License distributed with GNAT; see file COPYING. If not, write *
* to the Free Software Foundation, 51 Franklin Street, Fifth Floor, *
* Boston, MA 02110-1301, USA. *
* or FITNESS FOR A PARTICULAR PURPOSE. *
* *
* As a special exception, if you link this file with other files to *
* produce an executable, this file does not by itself cause the resulting *
* executable to be covered by the GNU General Public License. This except- *
* ion does not however invalidate any other reasons why the executable *
* file might be covered by the GNU Public License. *
* As a special exception under Section 7 of GPL version 3, you are granted *
* additional permissions described in the GCC Runtime Library Exception, *
* version 3.1, as published by the Free Software Foundation. *
* *
* You should have received a copy of the GNU General Public License and *
* a copy of the GCC Runtime Library Exception along with this program; *
* see the files COPYING3 and COPYING.RUNTIME respectively. If not, see *
* <http://www.gnu.org/licenses/>. *
* *
* GNAT was originally developed by the GNAT team at New York University. *
* Extensive contributions were provided by Ada Core Technologies Inc. *
......@@ -207,7 +206,7 @@ extern void (*Unlock_Task) (void);
#if defined (__APPLE__) \
&& defined (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) \
&& __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1040
#define USE_GCC_UNWINDER
#if defined (__i386__) || defined (__x86_64__)
......
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