diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-05-06 08:11:41 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-05-06 08:11:41 +0000 |
commit | 38b9cc41f84542f78353a1f9919a471ff1ff1002 (patch) | |
tree | 7b40ce34cdf446910efb8a5c3d278df8429b4f5a | |
parent | ce4896fb361b815d4018cf46510eedaff8191081 (diff) | |
download | gcc-38b9cc41f84542f78353a1f9919a471ff1ff1002.tar.gz |
2009-05-06 Gary Dismukes <dismukes@adacore.com>
* sem_aggr.adb (Resolve_Record_Aggregate): In step 5, get the
Underlying_Type before retrieving the type definition for gathering
components, to account for the case where the type is private.
2009-05-06 Tristan Gingold <gingold@adacore.com>
* g-comlin.ads: Fix minor typos (Getopt instead of Get_Opt).
2009-05-06 Thomas Quinot <quinot@adacore.com>
* g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.adb,
g-socthi-vxworks.ads, g-socthi-mingw.adb g-socthi-mingw.ads,
g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads, g-socket.adb
(GNAT.Sockets.Thin.C_Sendmsg, GNAT.Sockets.Thin.C_Recvmsg,
Windows versions): Fix incorrect base
address of Iovec (it's Msg_Iov, not Msg_Iov'Address).
(GNAT.Sockets.Thin.C_Sendto, GNAT.Sockets.Thin.C_Recvfrom): Use a
System.Address for the To parameter instead of a Sockaddr_In_Access, to
achieve independance from AF_INET family, and also to allow this
parameter to be retrieved from a Msghdr for the Windows case where
these routines are used to implement C_Sendmsg and C_Recvmsg.
2009-05-06 Bob Duff <duff@adacore.com>
* g-expect.adb, g-expect.ads: Minor reformatting
* sdefault.ads: Minor comment fix
* g-expect-vms.adb: Minor reformatting
* table.ads, table.adb (Append_All): New convenience procedure for
appending a whole array.
* comperr.adb (Compiler_Abort): Mention the -gnatd.n switch in the bug
box message. Call Osint.Dump_Source_File_Names to print out the file
list, instead of rummaging around in various data structures.
* debug.adb: New switch -gnatd.n, to print source file names as they
are read.
* alloc.ads: Add parameters for Osint.File_Name_Chars.
* osint.ads, osint.adb (Dump_Source_File_Names): New procedure to print
out source file names during a "bug box".
(Include_Dir_Default_Prefix): Use memo-izing to avoid repeated new/free.
(Read_Source_File): Print out the file name, if requested via -gnatd.n.
If it's not part of the runtimes, store it for later printing by
Dump_Source_File_Names.
2009-05-06 Javier Miranda <miranda@adacore.com>
* gnat_rm.texi (CPP_Constructor): Avoid duplication of the
documentation and add reference to the GNAT user guide for further
details.
2009-05-06 Javier Miranda <miranda@adacore.com>
* gnat_ugn.texi: Complete documentation for CPP_Constructor and remove
also wrong examples that use extension aggregates.
2009-05-06 Albert Lee <lee@adacore.com>
* s-oscons-tmplt.c (System.OS_Constants): Do not use special definition
of Msg_Iovlen_T for VMS.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@147148 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ada/ChangeLog | 67 | ||||
-rw-r--r-- | gcc/ada/alloc.ads | 3 | ||||
-rw-r--r-- | gcc/ada/comperr.adb | 29 | ||||
-rw-r--r-- | gcc/ada/debug.adb | 6 | ||||
-rw-r--r-- | gcc/ada/g-comlin.ads | 8 | ||||
-rw-r--r-- | gcc/ada/g-expect-vms.adb | 24 | ||||
-rw-r--r-- | gcc/ada/g-expect.adb | 20 | ||||
-rw-r--r-- | gcc/ada/g-expect.ads | 22 | ||||
-rw-r--r-- | gcc/ada/g-socket.adb | 8 | ||||
-rw-r--r-- | gcc/ada/g-socthi-mingw.adb | 38 | ||||
-rw-r--r-- | gcc/ada/g-socthi-mingw.ads | 4 | ||||
-rw-r--r-- | gcc/ada/g-socthi-vms.adb | 8 | ||||
-rw-r--r-- | gcc/ada/g-socthi-vms.ads | 4 | ||||
-rw-r--r-- | gcc/ada/g-socthi-vxworks.adb | 8 | ||||
-rw-r--r-- | gcc/ada/g-socthi-vxworks.ads | 4 | ||||
-rw-r--r-- | gcc/ada/g-socthi.adb | 8 | ||||
-rw-r--r-- | gcc/ada/g-socthi.ads | 4 | ||||
-rw-r--r-- | gcc/ada/g-stsifd-sockets.adb | 4 | ||||
-rw-r--r-- | gcc/ada/gnat_rm.texi | 48 | ||||
-rw-r--r-- | gcc/ada/gnat_ugn.texi | 32 | ||||
-rw-r--r-- | gcc/ada/osint.adb | 79 | ||||
-rw-r--r-- | gcc/ada/osint.ads | 8 | ||||
-rw-r--r-- | gcc/ada/s-oscons-tmplt.c | 2 | ||||
-rw-r--r-- | gcc/ada/sdefault.ads | 5 | ||||
-rw-r--r-- | gcc/ada/sem_aggr.adb | 6 | ||||
-rw-r--r-- | gcc/ada/table.adb | 11 | ||||
-rw-r--r-- | gcc/ada/table.ads | 3 |
27 files changed, 288 insertions, 175 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 384f4394c69..eeedef345c6 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,70 @@ +2009-05-06 Gary Dismukes <dismukes@adacore.com> + + * sem_aggr.adb (Resolve_Record_Aggregate): In step 5, get the + Underlying_Type before retrieving the type definition for gathering + components, to account for the case where the type is private. + +2009-05-06 Tristan Gingold <gingold@adacore.com> + + * g-comlin.ads: Fix minor typos (Getopt instead of Get_Opt). + +2009-05-06 Thomas Quinot <quinot@adacore.com> + + * g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.adb, + g-socthi-vxworks.ads, g-socthi-mingw.adb g-socthi-mingw.ads, + g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads, g-socket.adb + (GNAT.Sockets.Thin.C_Sendmsg, GNAT.Sockets.Thin.C_Recvmsg, + Windows versions): Fix incorrect base + address of Iovec (it's Msg_Iov, not Msg_Iov'Address). + (GNAT.Sockets.Thin.C_Sendto, GNAT.Sockets.Thin.C_Recvfrom): Use a + System.Address for the To parameter instead of a Sockaddr_In_Access, to + achieve independance from AF_INET family, and also to allow this + parameter to be retrieved from a Msghdr for the Windows case where + these routines are used to implement C_Sendmsg and C_Recvmsg. + +2009-05-06 Bob Duff <duff@adacore.com> + + * g-expect.adb, g-expect.ads: Minor reformatting + + * sdefault.ads: Minor comment fix + + * g-expect-vms.adb: Minor reformatting + + * table.ads, table.adb (Append_All): New convenience procedure for + appending a whole array. + + * comperr.adb (Compiler_Abort): Mention the -gnatd.n switch in the bug + box message. Call Osint.Dump_Source_File_Names to print out the file + list, instead of rummaging around in various data structures. + + * debug.adb: New switch -gnatd.n, to print source file names as they + are read. + + * alloc.ads: Add parameters for Osint.File_Name_Chars. + + * osint.ads, osint.adb (Dump_Source_File_Names): New procedure to print + out source file names during a "bug box". + (Include_Dir_Default_Prefix): Use memo-izing to avoid repeated new/free. + (Read_Source_File): Print out the file name, if requested via -gnatd.n. + If it's not part of the runtimes, store it for later printing by + Dump_Source_File_Names. + +2009-05-06 Javier Miranda <miranda@adacore.com> + + * gnat_rm.texi (CPP_Constructor): Avoid duplication of the + documentation and add reference to the GNAT user guide for further + details. + +2009-05-06 Javier Miranda <miranda@adacore.com> + + * gnat_ugn.texi: Complete documentation for CPP_Constructor and remove + also wrong examples that use extension aggregates. + +2009-05-06 Albert Lee <lee@adacore.com> + + * s-oscons-tmplt.c (System.OS_Constants): Do not use special definition + of Msg_Iovlen_T for VMS. + 2009-05-04 Laurent GUERBY <laurent@guerby.net> PR ada/38874 diff --git a/gcc/ada/alloc.ads b/gcc/ada/alloc.ads index 61c3ba867f4..fa6c9d123f5 100644 --- a/gcc/ada/alloc.ads +++ b/gcc/ada/alloc.ads @@ -61,6 +61,9 @@ package Alloc is Elmts_Initial : constant := 1_200; -- Elists Elmts_Increment : constant := 100; + File_Name_Chars_Initial : constant := 10_000; -- Osint + File_Name_Chars_Increment : constant := 100; + Inlined_Bodies_Initial : constant := 50; -- Inline Inlined_Bodies_Increment : constant := 200; diff --git a/gcc/ada/comperr.adb b/gcc/ada/comperr.adb index 157945bb0d9..43680b1b4bb 100644 --- a/gcc/ada/comperr.adb +++ b/gcc/ada/comperr.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2008, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2009, 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- -- @@ -30,9 +30,7 @@ with Atree; use Atree; with Debug; use Debug; with Errout; use Errout; -with Fname; use Fname; with Gnatvsn; use Gnatvsn; -with Lib; use Lib; with Namet; use Namet; with Osint; use Osint; with Output; use Output; @@ -395,26 +393,19 @@ package body Comperr is Write_Line ("Note that list may not be accurate in some cases, "); Write_Line ("so please double check that the problem can still "); Write_Line ("be reproduced with the set of files listed."); + Write_Line ("Consider also -gnatd.n switch (see debug.adb)."); Write_Eol; - for U in Main_Unit .. Last_Unit loop - begin - if not Is_Internal_File_Name - (File_Name (Source_Index (U))) - then - Write_Name (Full_File_Name (Source_Index (U))); - Write_Eol; - end if; + begin + Dump_Source_File_Names; - -- No point in double bug box if we blow up trying to print - -- the list of file names! Output informative msg and quit. + -- If we blow up trying to print the list of file names, just output + -- informative msg and continue. - exception - when others => - Write_Str ("list may be incomplete"); - exit; - end; - end loop; + exception + when others => + Write_Str ("list may be incomplete"); + end; Write_Eol; Set_Standard_Output; diff --git a/gcc/ada/debug.adb b/gcc/ada/debug.adb index 8cb47ac5886..d0b285abf34 100644 --- a/gcc/ada/debug.adb +++ b/gcc/ada/debug.adb @@ -104,7 +104,7 @@ package body Debug is -- d.k -- d.l Use Ada 95 semantics for limited function returns -- d.m For -gnatl, print full source only for main unit - -- d.n + -- d.n Print source file names -- d.o -- d.p -- d.q @@ -523,6 +523,10 @@ package body Debug is -- main source (this corresponds to a previous behavior of -gnatl and -- is used for running the ACATS tests). + -- d.n Print source file names as they are loaded. This is useful if the + -- compiler has a bug -- these are the files that need to be included + -- in a bug report. + -- d.r Forces the flag OK_To_Reorder_Components to be set in all record -- base types that have no discriminants. diff --git a/gcc/ada/g-comlin.ads b/gcc/ada/g-comlin.ads index 1f393afd042..526624244eb 100644 --- a/gcc/ada/g-comlin.ads +++ b/gcc/ada/g-comlin.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1999-2008, AdaCore -- +-- Copyright (C) 1999-2009, 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- -- @@ -96,13 +96,13 @@ -- Goto_Section ("bargs"); -- loop -- -- Same loop as above to get switches and arguments --- -- The supported switches in Get_Opt might be different +-- -- The supported switches in Getopt might be different -- end loop; -- Goto_Section ("cargs"); -- loop -- -- Same loop as above to get switches and arguments --- -- The supported switches in Get_Opt might be different +-- -- The supported switches in Getopt might be different -- end loop; -- end; @@ -125,7 +125,7 @@ -- GNAT.OS_Lib.Argument_String_To_List ("-g -O1 -Ipath"); -- begin -- Initialize_Option_Scan (Parser, Args); --- while Get_Opt ("* g O! I=", Parser) /= ASCII.NUL loop +-- while Getopt ("* g O! I=", Parser) /= ASCII.NUL loop -- Put_Line ("Switch " & Full_Switch (Parser) -- & " param=" & Parameter (Parser)); -- end loop; diff --git a/gcc/ada/g-expect-vms.adb b/gcc/ada/g-expect-vms.adb index bc74a5d261e..1162f50aa69 100644 --- a/gcc/ada/g-expect-vms.adb +++ b/gcc/ada/g-expect-vms.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2002-2008, AdaCore -- +-- Copyright (C) 2002-2009, 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- -- @@ -249,7 +249,7 @@ package body GNAT.Expect is (Descriptor : in out Process_Descriptor; Result : out Expect_Match; Regexp : String; - Timeout : Integer := 10000; + Timeout : Integer := 10_000; Full_Buffer : Boolean := False) is begin @@ -265,7 +265,7 @@ package body GNAT.Expect is Result : out Expect_Match; Regexp : String; Matched : out GNAT.Regpat.Match_Array; - Timeout : Integer := 10000; + Timeout : Integer := 10_000; Full_Buffer : Boolean := False) is begin @@ -284,7 +284,7 @@ package body GNAT.Expect is (Descriptor : in out Process_Descriptor; Result : out Expect_Match; Regexp : GNAT.Regpat.Pattern_Matcher; - Timeout : Integer := 10000; + Timeout : Integer := 10_000; Full_Buffer : Boolean := False) is Matched : GNAT.Regpat.Match_Array (0 .. 0); @@ -298,7 +298,7 @@ package body GNAT.Expect is Result : out Expect_Match; Regexp : GNAT.Regpat.Pattern_Matcher; Matched : out GNAT.Regpat.Match_Array; - Timeout : Integer := 10000; + Timeout : Integer := 10_000; Full_Buffer : Boolean := False) is N : Expect_Match; @@ -370,7 +370,7 @@ package body GNAT.Expect is (Descriptor : in out Process_Descriptor; Result : out Expect_Match; Regexps : Regexp_Array; - Timeout : Integer := 10000; + Timeout : Integer := 10_000; Full_Buffer : Boolean := False) is Patterns : Compiled_Regexp_Array (Regexps'Range); @@ -392,7 +392,7 @@ package body GNAT.Expect is (Descriptor : in out Process_Descriptor; Result : out Expect_Match; Regexps : Compiled_Regexp_Array; - Timeout : Integer := 10000; + Timeout : Integer := 10_000; Full_Buffer : Boolean := False) is Matched : GNAT.Regpat.Match_Array (0 .. 0); @@ -404,7 +404,7 @@ package body GNAT.Expect is procedure Expect (Result : out Expect_Match; Regexps : Multiprocess_Regexp_Array; - Timeout : Integer := 10000; + Timeout : Integer := 10_000; Full_Buffer : Boolean := False) is Matched : GNAT.Regpat.Match_Array (0 .. 0); @@ -418,7 +418,7 @@ package body GNAT.Expect is Result : out Expect_Match; Regexps : Regexp_Array; Matched : out GNAT.Regpat.Match_Array; - Timeout : Integer := 10000; + Timeout : Integer := 10_000; Full_Buffer : Boolean := False) is Patterns : Compiled_Regexp_Array (Regexps'Range); @@ -442,7 +442,7 @@ package body GNAT.Expect is Result : out Expect_Match; Regexps : Compiled_Regexp_Array; Matched : out GNAT.Regpat.Match_Array; - Timeout : Integer := 10000; + Timeout : Integer := 10_000; Full_Buffer : Boolean := False) is N : Expect_Match; @@ -489,7 +489,7 @@ package body GNAT.Expect is (Result : out Expect_Match; Regexps : Multiprocess_Regexp_Array; Matched : out GNAT.Regpat.Match_Array; - Timeout : Integer := 10000; + Timeout : Integer := 10_000; Full_Buffer : Boolean := False) is N : Expect_Match; @@ -646,7 +646,7 @@ package body GNAT.Expect is else -- Add what we read to the buffer - if Descriptors (J).Buffer_Index + N - 1 > + if Descriptors (J).Buffer_Index + N > Descriptors (J).Buffer_Size then -- If the user wants to know when we have diff --git a/gcc/ada/g-expect.adb b/gcc/ada/g-expect.adb index 256f2564d8f..7ce2c89d771 100644 --- a/gcc/ada/g-expect.adb +++ b/gcc/ada/g-expect.adb @@ -261,7 +261,7 @@ package body GNAT.Expect is (Descriptor : in out Process_Descriptor; Result : out Expect_Match; Regexp : String; - Timeout : Integer := 10000; + Timeout : Integer := 10_000; Full_Buffer : Boolean := False) is begin @@ -277,7 +277,7 @@ package body GNAT.Expect is Result : out Expect_Match; Regexp : String; Matched : out GNAT.Regpat.Match_Array; - Timeout : Integer := 10000; + Timeout : Integer := 10_000; Full_Buffer : Boolean := False) is begin @@ -296,7 +296,7 @@ package body GNAT.Expect is (Descriptor : in out Process_Descriptor; Result : out Expect_Match; Regexp : GNAT.Regpat.Pattern_Matcher; - Timeout : Integer := 10000; + Timeout : Integer := 10_000; Full_Buffer : Boolean := False) is Matched : GNAT.Regpat.Match_Array (0 .. 0); @@ -310,7 +310,7 @@ package body GNAT.Expect is Result : out Expect_Match; Regexp : GNAT.Regpat.Pattern_Matcher; Matched : out GNAT.Regpat.Match_Array; - Timeout : Integer := 10000; + Timeout : Integer := 10_000; Full_Buffer : Boolean := False) is N : Expect_Match; @@ -382,7 +382,7 @@ package body GNAT.Expect is (Descriptor : in out Process_Descriptor; Result : out Expect_Match; Regexps : Regexp_Array; - Timeout : Integer := 10000; + Timeout : Integer := 10_000; Full_Buffer : Boolean := False) is Patterns : Compiled_Regexp_Array (Regexps'Range); @@ -406,7 +406,7 @@ package body GNAT.Expect is (Descriptor : in out Process_Descriptor; Result : out Expect_Match; Regexps : Compiled_Regexp_Array; - Timeout : Integer := 10000; + Timeout : Integer := 10_000; Full_Buffer : Boolean := False) is Matched : GNAT.Regpat.Match_Array (0 .. 0); @@ -418,7 +418,7 @@ package body GNAT.Expect is procedure Expect (Result : out Expect_Match; Regexps : Multiprocess_Regexp_Array; - Timeout : Integer := 10000; + Timeout : Integer := 10_000; Full_Buffer : Boolean := False) is Matched : GNAT.Regpat.Match_Array (0 .. 0); @@ -432,7 +432,7 @@ package body GNAT.Expect is Result : out Expect_Match; Regexps : Regexp_Array; Matched : out GNAT.Regpat.Match_Array; - Timeout : Integer := 10000; + Timeout : Integer := 10_000; Full_Buffer : Boolean := False) is Patterns : Compiled_Regexp_Array (Regexps'Range); @@ -456,7 +456,7 @@ package body GNAT.Expect is Result : out Expect_Match; Regexps : Compiled_Regexp_Array; Matched : out GNAT.Regpat.Match_Array; - Timeout : Integer := 10000; + Timeout : Integer := 10_000; Full_Buffer : Boolean := False) is N : Expect_Match; @@ -503,7 +503,7 @@ package body GNAT.Expect is (Result : out Expect_Match; Regexps : Multiprocess_Regexp_Array; Matched : out GNAT.Regpat.Match_Array; - Timeout : Integer := 10000; + Timeout : Integer := 10_000; Full_Buffer : Boolean := False) is N : Expect_Match; diff --git a/gcc/ada/g-expect.ads b/gcc/ada/g-expect.ads index 31dda4134b1..1e50852522a 100644 --- a/gcc/ada/g-expect.ads +++ b/gcc/ada/g-expect.ads @@ -51,7 +51,7 @@ -- Non_Blocking_Spawn -- (Fd, "ftp", -- (1 => new String' ("machine@domain"))); --- Timeout := 10000; -- 10 seconds +-- Timeout := 10_000; -- 10 seconds -- Expect (Fd, Result, Regexp_Array'(+"\(user\)", +"\(passwd\)"), -- Timeout); -- case Result is @@ -328,7 +328,7 @@ package GNAT.Expect is (Descriptor : in out Process_Descriptor; Result : out Expect_Match; Regexp : String; - Timeout : Integer := 10000; + Timeout : Integer := 10_000; Full_Buffer : Boolean := False); -- Wait till a string matching Fd can be read from Fd, and return 1 -- if a match was found. @@ -359,7 +359,7 @@ package GNAT.Expect is (Descriptor : in out Process_Descriptor; Result : out Expect_Match; Regexp : GNAT.Regpat.Pattern_Matcher; - Timeout : Integer := 10000; + Timeout : Integer := 10_000; Full_Buffer : Boolean := False); -- Same as the previous one, but with a precompiled regular expression. -- This is more efficient however, especially if you are using this @@ -371,7 +371,7 @@ package GNAT.Expect is Result : out Expect_Match; Regexp : String; Matched : out GNAT.Regpat.Match_Array; - Timeout : Integer := 10000; + Timeout : Integer := 10_000; Full_Buffer : Boolean := False); -- Same as above, but it is now possible to get the indexes of the -- substrings for the parentheses in the regexp (see the example at the @@ -391,7 +391,7 @@ package GNAT.Expect is Result : out Expect_Match; Regexp : GNAT.Regpat.Pattern_Matcher; Matched : out GNAT.Regpat.Match_Array; - Timeout : Integer := 10000; + Timeout : Integer := 10_000; Full_Buffer : Boolean := False); -- Same as above, but with a precompiled regular expression @@ -416,7 +416,7 @@ package GNAT.Expect is (Descriptor : in out Process_Descriptor; Result : out Expect_Match; Regexps : Regexp_Array; - Timeout : Integer := 10000; + Timeout : Integer := 10_000; Full_Buffer : Boolean := False); -- Wait till a string matching one of the regular expressions in Regexps -- is found. This function returns the index of the regexp that matched. @@ -427,7 +427,7 @@ package GNAT.Expect is (Descriptor : in out Process_Descriptor; Result : out Expect_Match; Regexps : Compiled_Regexp_Array; - Timeout : Integer := 10000; + Timeout : Integer := 10_000; Full_Buffer : Boolean := False); -- Same as the previous one, but with precompiled regular expressions. -- This can be much faster if you are using them multiple times. @@ -437,7 +437,7 @@ package GNAT.Expect is Result : out Expect_Match; Regexps : Regexp_Array; Matched : out GNAT.Regpat.Match_Array; - Timeout : Integer := 10000; + Timeout : Integer := 10_000; Full_Buffer : Boolean := False); -- Same as above, except that you can also access the parenthesis -- groups inside the matching regular expression. @@ -451,7 +451,7 @@ package GNAT.Expect is Result : out Expect_Match; Regexps : Compiled_Regexp_Array; Matched : out GNAT.Regpat.Match_Array; - Timeout : Integer := 10000; + Timeout : Integer := 10_000; Full_Buffer : Boolean := False); -- Same as above, but with precompiled regular expressions. -- The first index in Matched must be 0, or Constraint_Error will be @@ -472,14 +472,14 @@ package GNAT.Expect is (Result : out Expect_Match; Regexps : Multiprocess_Regexp_Array; Matched : out GNAT.Regpat.Match_Array; - Timeout : Integer := 10000; + Timeout : Integer := 10_000; Full_Buffer : Boolean := False); -- Same as above, but for multi processes procedure Expect (Result : out Expect_Match; Regexps : Multiprocess_Regexp_Array; - Timeout : Integer := 10000; + Timeout : Integer := 10_000; Full_Buffer : Boolean := False); -- Same as the previous one, but for multiple processes. -- This procedure finds the first regexp that match the associated process. diff --git a/gcc/ada/g-socket.adb b/gcc/ada/g-socket.adb index 4caa5f47244..9cd471afd54 100644 --- a/gcc/ada/g-socket.adb +++ b/gcc/ada/g-socket.adb @@ -1644,7 +1644,7 @@ package body GNAT.Sockets is Item'Address, Item'Length, To_Int (Flags), - Sin'Unchecked_Access, + Sin'Address, Len'Access); if Res = Failure then @@ -1861,7 +1861,7 @@ package body GNAT.Sockets is Res : C.int; Sin : aliased Sockaddr_In; - C_To : Sockaddr_In_Access; + C_To : System.Address; Len : C.int; begin @@ -1871,11 +1871,11 @@ package body GNAT.Sockets is Set_Port (Sin'Unchecked_Access, Short_To_Network (C.unsigned_short (To.Port))); - C_To := Sin'Unchecked_Access; + C_To := Sin'Address; Len := Sin'Size / 8; else - C_To := null; + C_To := System.Null_Address; Len := 0; end if; diff --git a/gcc/ada/g-socthi-mingw.adb b/gcc/ada/g-socthi-mingw.adb index c77048671bc..093731ce40d 100644 --- a/gcc/ada/g-socthi-mingw.adb +++ b/gcc/ada/g-socthi-mingw.adb @@ -263,24 +263,20 @@ package body GNAT.Sockets.Thin is for MH'Address use Msg; Iovec : array (0 .. MH.Msg_Iovlen - 1) of Vector_Element; - for Iovec'Address use MH.Msg_Iov'Address; + for Iovec'Address use MH.Msg_Iov; pragma Import (Ada, Iovec); - pragma Unreferenced (Flags); - begin - -- Windows does not provide an implementation of recvmsg(). The - -- spec for WSARecvMsg() is incompatible with the data types we - -- define, and is not available in all versions of Windows. So, - -- we'll use C_Recv instead. Note that this means the Flags - -- argument is ignored. + -- Windows does not provide an implementation of recvmsg(). The spec for + -- WSARecvMsg() is incompatible with the data types we define, and is + -- not available in all versions of Windows. So, we use C_Recv instead. for J in Iovec'Range loop Res := C_Recv (S, Iovec (J).Base.all'Address, C.int (Iovec (J).Length), - 0); + Flags); if Res < 0 then return ssize_t (Res); @@ -359,7 +355,10 @@ package body GNAT.Sockets.Thin is -- Check out-of-band data Length := C_Recvfrom - (S, Buffer'Address, 1, Flag, null, Fromlen'Unchecked_Access); + (S, Buffer'Address, 1, Flag, + From => System.Null_Address, + Fromlen => Fromlen'Unchecked_Access); + -- Is Fromlen necessary if From is Null_Address??? -- If the signal is not an out-of-band data, then it -- is a connection failure notification. @@ -399,26 +398,23 @@ package body GNAT.Sockets.Thin is for MH'Address use Msg; Iovec : array (0 .. MH.Msg_Iovlen - 1) of Vector_Element; - for Iovec'Address use MH.Msg_Iov'Address; + for Iovec'Address use MH.Msg_Iov; pragma Import (Ada, Iovec); - pragma Unreferenced (Flags); - begin - -- Windows does not provide an implementation of sendmsg(). The - -- spec for WSASendMsg() is incompatible with the data types we - -- define, and is not available in all versions of Windows. So, - -- we'll use C_Sendto instead. Note that this means the Flags - -- argument is ignored. + -- Windows does not provide an implementation of sendmsg(). The spec for + -- WSASendMsg() is incompatible with the data types we define, and is + -- not available in all versions of Windows. So, we'll use C_Sendto + -- instead. for J in Iovec'Range loop Res := C_Sendto (S, Iovec (J).Base.all'Address, C.int (Iovec (J).Length), - Flags => 0, - To => null, - Tolen => 0); + Flags => Flags, + To => MH.Msg_Name, + Tolen => C.int (MH.Msg_Namelen)); if Res < 0 then return ssize_t (Res); diff --git a/gcc/ada/g-socthi-mingw.ads b/gcc/ada/g-socthi-mingw.ads index 7b24eeec4e1..922e64aa22f 100644 --- a/gcc/ada/g-socthi-mingw.ads +++ b/gcc/ada/g-socthi-mingw.ads @@ -140,7 +140,7 @@ package GNAT.Sockets.Thin is Msg : System.Address; Len : C.int; Flags : C.int; - From : Sockaddr_In_Access; + From : System.Address; Fromlen : not null access C.int) return C.int; function C_Recvmsg @@ -165,7 +165,7 @@ package GNAT.Sockets.Thin is Msg : System.Address; Len : C.int; Flags : C.int; - To : Sockaddr_In_Access; + To : System.Address; Tolen : C.int) return C.int; function C_Setsockopt diff --git a/gcc/ada/g-socthi-vms.adb b/gcc/ada/g-socthi-vms.adb index 14576805602..696a298004c 100644 --- a/gcc/ada/g-socthi-vms.adb +++ b/gcc/ada/g-socthi-vms.adb @@ -87,7 +87,7 @@ package body GNAT.Sockets.Thin is Msg : System.Address; Len : C.int; Flags : C.int; - From : Sockaddr_In_Access; + From : System.Address; Fromlen : not null access C.int) return C.int; pragma Import (C, Syscall_Recvfrom, "recvfrom"); @@ -108,7 +108,7 @@ package body GNAT.Sockets.Thin is Msg : System.Address; Len : C.int; Flags : C.int; - To : Sockaddr_In_Access; + To : System.Address; Tolen : C.int) return C.int; pragma Import (C, Syscall_Sendto, "sendto"); @@ -271,7 +271,7 @@ package body GNAT.Sockets.Thin is Msg : System.Address; Len : C.int; Flags : C.int; - From : Sockaddr_In_Access; + From : System.Address; Fromlen : not null access C.int) return C.int is Res : C.int; @@ -346,7 +346,7 @@ package body GNAT.Sockets.Thin is Msg : System.Address; Len : C.int; Flags : C.int; - To : Sockaddr_In_Access; + To : System.Address; Tolen : C.int) return C.int is Res : C.int; diff --git a/gcc/ada/g-socthi-vms.ads b/gcc/ada/g-socthi-vms.ads index 2fd5009db15..3799da802d2 100644 --- a/gcc/ada/g-socthi-vms.ads +++ b/gcc/ada/g-socthi-vms.ads @@ -143,7 +143,7 @@ package GNAT.Sockets.Thin is Msg : System.Address; Len : C.int; Flags : C.int; - From : Sockaddr_In_Access; + From : System.Address; Fromlen : not null access C.int) return C.int; function C_Recvmsg @@ -168,7 +168,7 @@ package GNAT.Sockets.Thin is Msg : System.Address; Len : C.int; Flags : C.int; - To : Sockaddr_In_Access; + To : System.Address; Tolen : C.int) return C.int; function C_Setsockopt diff --git a/gcc/ada/g-socthi-vxworks.adb b/gcc/ada/g-socthi-vxworks.adb index 0f682f4c04e..a35e429fbb2 100644 --- a/gcc/ada/g-socthi-vxworks.adb +++ b/gcc/ada/g-socthi-vxworks.adb @@ -98,7 +98,7 @@ package body GNAT.Sockets.Thin is Msg : System.Address; Len : C.int; Flags : C.int; - From : Sockaddr_In_Access; + From : System.Address; Fromlen : not null access C.int) return C.int; pragma Import (C, Syscall_Recvfrom, "recvfrom"); @@ -119,7 +119,7 @@ package body GNAT.Sockets.Thin is Msg : System.Address; Len : C.int; Flags : C.int; - To : Sockaddr_In_Access; + To : System.Address; Tolen : C.int) return C.int; pragma Import (C, Syscall_Sendto, "sendto"); @@ -285,7 +285,7 @@ package body GNAT.Sockets.Thin is Msg : System.Address; Len : C.int; Flags : C.int; - From : Sockaddr_In_Access; + From : System.Address; Fromlen : not null access C.int) return C.int is Res : C.int; @@ -360,7 +360,7 @@ package body GNAT.Sockets.Thin is Msg : System.Address; Len : C.int; Flags : C.int; - To : Sockaddr_In_Access; + To : System.Address; Tolen : C.int) return C.int is Res : C.int; diff --git a/gcc/ada/g-socthi-vxworks.ads b/gcc/ada/g-socthi-vxworks.ads index 4b6bd34d080..14b8ad92428 100644 --- a/gcc/ada/g-socthi-vxworks.ads +++ b/gcc/ada/g-socthi-vxworks.ads @@ -141,7 +141,7 @@ package GNAT.Sockets.Thin is Msg : System.Address; Len : C.int; Flags : C.int; - From : Sockaddr_In_Access; + From : System.Address; Fromlen : not null access C.int) return C.int; function C_Recvmsg @@ -166,7 +166,7 @@ package GNAT.Sockets.Thin is Msg : System.Address; Len : C.int; Flags : C.int; - To : Sockaddr_In_Access; + To : System.Address; Tolen : C.int) return C.int; function C_Setsockopt diff --git a/gcc/ada/g-socthi.adb b/gcc/ada/g-socthi.adb index daf69140ed1..0ffee86af49 100644 --- a/gcc/ada/g-socthi.adb +++ b/gcc/ada/g-socthi.adb @@ -94,7 +94,7 @@ package body GNAT.Sockets.Thin is Msg : System.Address; Len : C.int; Flags : C.int; - From : Sockaddr_In_Access; + From : System.Address; Fromlen : not null access C.int) return C.int; pragma Import (C, Syscall_Recvfrom, "recvfrom"); @@ -115,7 +115,7 @@ package body GNAT.Sockets.Thin is Msg : System.Address; Len : C.int; Flags : C.int; - To : Sockaddr_In_Access; + To : System.Address; Tolen : C.int) return C.int; pragma Import (C, Syscall_Sendto, "sendto"); @@ -290,7 +290,7 @@ package body GNAT.Sockets.Thin is Msg : System.Address; Len : C.int; Flags : C.int; - From : Sockaddr_In_Access; + From : System.Address; Fromlen : not null access C.int) return C.int is Res : C.int; @@ -365,7 +365,7 @@ package body GNAT.Sockets.Thin is Msg : System.Address; Len : C.int; Flags : C.int; - To : Sockaddr_In_Access; + To : System.Address; Tolen : C.int) return C.int is Res : C.int; diff --git a/gcc/ada/g-socthi.ads b/gcc/ada/g-socthi.ads index b5186d062c6..cb19050250b 100644 --- a/gcc/ada/g-socthi.ads +++ b/gcc/ada/g-socthi.ads @@ -142,7 +142,7 @@ package GNAT.Sockets.Thin is Msg : System.Address; Len : C.int; Flags : C.int; - From : Sockaddr_In_Access; + From : System.Address; Fromlen : not null access C.int) return C.int; function C_Recvmsg @@ -167,7 +167,7 @@ package GNAT.Sockets.Thin is Msg : System.Address; Len : C.int; Flags : C.int; - To : Sockaddr_In_Access; + To : System.Address; Tolen : C.int) return C.int; function C_Setsockopt diff --git a/gcc/ada/g-stsifd-sockets.adb b/gcc/ada/g-stsifd-sockets.adb index 23fdb59af76..3e3f4518820 100644 --- a/gcc/ada/g-stsifd-sockets.adb +++ b/gcc/ada/g-stsifd-sockets.adb @@ -229,8 +229,8 @@ package body Signalling_Fds is return C_Sendto (Wsig, Buf'Address, 1, Flags => SOSC.MSG_Forced_Flags, - To => null, - Tolen => 0); + To => System.Null_Address, + Tolen => 0); end Write; end Signalling_Fds; diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi index 509717f681d..0f7bd74b0a0 100644 --- a/gcc/ada/gnat_rm.texi +++ b/gcc/ada/gnat_rm.texi @@ -1502,7 +1502,7 @@ equality operators defined (such operations can be imported or declared as subprograms as required). Initialization is allowed only by constructor functions (see pragma @code{CPP_Constructor}). Such types are implicitly limited if not explicitly declared as limited or derived from a limited -type, and a warning is issued in that case. +type, and an error is issued in that case. Pragma @code{CPP_Class} is intended primarily for automatic generation using an automatic binding generator tool. @@ -1547,50 +1547,8 @@ where @var{T} is a tagged limited type imported from C++ with pragma The first form is the default constructor, used when an object of type @var{T} is created on the Ada side with no explicit constructor. The -second form covers all the non-default constructors of the type. -Constructors (including the copy constructor, which is simply a special -case of the second form in which the one and only argument is of type -@var{T}), can only appear in the following contexts: - -@itemize @bullet -@item -On the right side of an initialization of an object of type @var{T}. -@item -On the right side of an initialization of a record component of type @var{T}. -@item -In an extension aggregate for an object of a type derived from @var{T}. -@item -In an Ada 2005 limited aggregate. -@item -In an Ada 2005 nested limited aggregate. -@item -In an Ada 2005 limited aggregate that initializes an object built in -place by an extended return statement. -@end itemize - -@noindent -Although the constructor is described as a function that returns a value -on the Ada side, it is typically a procedure with an extra implicit -argument (the object being initialized) at the implementation -level. GNAT issues the appropriate call, whatever it is, to get the -object properly initialized. - -In the case of objects of derived types, in addition to the use of Ada -2005 limited aggregates and extended return statements, you may also -use one of the following two possible forms for declaring and creating -an object: - -@itemize @bullet -@item @code{New_Object : Derived_T} -@item @code{New_Object : Derived_T := (@var{constructor-call with} @dots{})} -@end itemize - -@noindent -In the first case the default constructor is called and extension fields -if any are initialized according to the default initialization -expressions in the Ada declaration. In the second case, the given -constructor is called and the extension aggregate indicates the explicit -values of the extension fields. +second form covers all the non-default constructors of the type. See +the GNAT users guide for details. If no constructors are imported, it is impossible to create any objects on the Ada side and the type is implicitly declared abstract. diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi index 4ab16ee75a9..78fee6ac095 100644 --- a/gcc/ada/gnat_ugn.texi +++ b/gcc/ada/gnat_ugn.texi @@ -3291,8 +3291,29 @@ end Pkg_Root; On the Ada side the constructor is represented by a function (whose name is arbitrary) that returns the classwide type corresponding to -the imported C++ class. +the imported C++ class. Although the constructor is described as a +function, it is typically a procedure with an extra implicit argument +(the object being initialized) at the implementation level. GNAT +issues the appropriate call, whatever it is, to get the object +properly initialized. +Constructors can only appear in the following contexts: + +@itemize @bullet +@item +On the right side of an initialization of an object of type @var{T}. +@item +On the right side of an initialization of a record component of type @var{T}. +@item +In an Ada 2005 limited aggregate. +@item +In an Ada 2005 nested limited aggregate. +@item +In an Ada 2005 limited aggregate that initializes an object built in +place by an extended return statement. +@end itemize + +@noindent In a declaration of an object whose type is a class imported from C++, either the default C++ constructor is implicitly called by GNAT, or else the required C++ constructor must be explicitly called in the @@ -3324,12 +3345,11 @@ In this case the components DT inherited from the C++ side must be initialized by a C++ constructor, and the additional Ada components of type DT are initialized by GNAT. The initialization of such an object is done either by default, or by means of a function returning -an aggregate of type DT, or by means of an extended aggregate. +an aggregate of type DT. @smallexample @c ada Obj5 : DT; Obj6 : DT := Function_Returning_DT (50); - Obj7 : DT := (Constructor (30,40) with (C_Value => 50)); @end smallexample The declaration of @code{Obj5} invokes the default constructors: the @@ -3361,7 +3381,7 @@ non-default C++ constructors specified for the imported components. For example: @smallexample @c ada - Obj8 : Rec2 (40); + Obj7 : Rec2 (40); @end smallexample Using Ada 2005 we can use limited aggregates to initialize an object @@ -3369,13 +3389,13 @@ invoking C++ constructors that differ from those specified in the type declarations. For example: @smallexample @c ada - Obj9 : Rec2 := (Rec => (Data1 => Constructor (15, 16), + Obj8 : Rec2 := (Rec => (Data1 => Constructor (15, 16), others => <>), others => <>); @end smallexample The above declaration uses an Ada 2005 limited aggregate to -initialize @code{Obj9}, and the C++ constructor that has two integer +initialize @code{Obj8}, and the C++ constructor that has two integer arguments is invoked to initialize the @code{Data1} component instead of the constructor specified in the declaration of type @code{Rec1}. In Ada 2005 the box in the aggregate indicates that unspecified components diff --git a/gcc/ada/osint.adb b/gcc/ada/osint.adb index 04e2919cc24..00d0eb88d71 100644 --- a/gcc/ada/osint.adb +++ b/gcc/ada/osint.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2008, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2009, 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- -- @@ -29,6 +29,8 @@ with System.Case_Util; use System.Case_Util; with GNAT.HTable; +with Alloc; +with Debug; with Fmap; use Fmap; with Gnatvsn; use Gnatvsn; with Hostparm; @@ -111,6 +113,9 @@ package body Osint is -- Converts a C String to an Ada String. Are we doing this to avoid withing -- Interfaces.C.Strings ??? + function Include_Dir_Default_Prefix return String_Access; + -- Same as exported version, except returns a String_Access + ------------------------------ -- Other Local Declarations -- ------------------------------ @@ -137,6 +142,20 @@ package body Osint is -- latest source, library and object files opened by Read_Source_File and -- Read_Library_Info. + package File_Name_Chars is new Table.Table ( + Table_Component_Type => Character, + Table_Index_Type => Int, + Table_Low_Bound => 1, + Table_Initial => Alloc.File_Name_Chars_Initial, + Table_Increment => Alloc.File_Name_Chars_Increment, + Table_Name => "File_Name_Chars"); + -- Table to store text to be printed by Dump_Source_File_Names + + The_Include_Dir_Default_Prefix : String_Access := null; + -- Value returned by Include_Dir_Default_Prefix. We don't initialize it + -- here, because that causes an elaboration cycle with Sdefault; we + -- initialize it lazily instead. + ------------------ -- Search Paths -- ------------------ @@ -717,6 +736,16 @@ package body Osint is end if; end Dir_In_Src_Search_Path; + ---------------------------- + -- Dump_Source_File_Names -- + ---------------------------- + + procedure Dump_Source_File_Names is + subtype Rng is Int range File_Name_Chars.First .. File_Name_Chars.Last; + begin + Write_Str (String (File_Name_Chars.Table (Rng))); + end Dump_Source_File_Names; + --------------------- -- Executable_Name -- --------------------- @@ -1392,22 +1421,19 @@ package body Osint is -- Include_Dir_Default_Prefix -- -------------------------------- - function Include_Dir_Default_Prefix return String is - Include_Dir : String_Access := - String_Access (Update_Path (Include_Dir_Default_Name)); - + function Include_Dir_Default_Prefix return String_Access is begin - if Include_Dir = null then - return ""; - - else - declare - Result : constant String := Include_Dir.all; - begin - Free (Include_Dir); - return Result; - end; + if The_Include_Dir_Default_Prefix = null then + The_Include_Dir_Default_Prefix := + String_Access (Update_Path (Include_Dir_Default_Name)); end if; + + return The_Include_Dir_Default_Prefix; + end Include_Dir_Default_Prefix; + + function Include_Dir_Default_Prefix return String is + begin + return Include_Dir_Default_Prefix.all; end Include_Dir_Default_Prefix; ---------------- @@ -2268,6 +2294,29 @@ package body Osint is return; end if; + -- Print out the file name, if requested, and if it's not part of the + -- runtimes, store it in File_Name_Chars. + + declare + Name : String renames Name_Buffer (1 .. Name_Len); + Inc : String renames Include_Dir_Default_Prefix.all; + begin + if Debug.Debug_Flag_Dot_N then + Write_Line (Name); + end if; + + if Inc /= "" + and then Inc'Length < Name_Len + and then Name_Buffer (1 .. Inc'Length) = Inc + then + null; -- Part of runtimes, so ignore it + + else + File_Name_Chars.Append_All (File_Name_Chars.Table_Type (Name)); + File_Name_Chars.Append (ASCII.LF); + end if; + end; + -- Prepare to read data from the file Len := Integer (File_Length (Source_File_FD)); diff --git a/gcc/ada/osint.ads b/gcc/ada/osint.ads index 4d82c86a5a2..5de8eced2ac 100644 --- a/gcc/ada/osint.ads +++ b/gcc/ada/osint.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2008, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2009, 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- -- @@ -410,6 +410,12 @@ package Osint is -- Cache => True access to source file data does not incur a penalty if -- this data was previously retrieved. + procedure Dump_Source_File_Names; + -- Prints out the names of all source files that have been read by + -- Read_Source_File, except those that come from the run-time library + -- (i.e. Include_Dir_Default_Prefix). The text is sent to whatever Output + -- is currently using (e.g. standard output or standard error). + ------------------------------------------- -- Representation of Library Information -- ------------------------------------------- diff --git a/gcc/ada/s-oscons-tmplt.c b/gcc/ada/s-oscons-tmplt.c index 24555f1278a..694fcf1b622 100644 --- a/gcc/ada/s-oscons-tmplt.c +++ b/gcc/ada/s-oscons-tmplt.c @@ -1184,7 +1184,7 @@ TXT(" subtype H_Length_T is Interfaces.C." h_length_t ";") -- Fields of struct msghdr */ -#if defined (__VMS) || defined (__sun__) || defined (__hpux__) +#if defined (__sun__) || defined (__hpux__) # define msg_iovlen_t "int" #else # define msg_iovlen_t "size_t" diff --git a/gcc/ada/sdefault.ads b/gcc/ada/sdefault.ads index 3b3c8899875..21745fbb674 100644 --- a/gcc/ada/sdefault.ads +++ b/gcc/ada/sdefault.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2007, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2009, 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- -- @@ -25,7 +25,8 @@ -- This package contains functions that return the default values for the -- include and object file directories, target name, default library --- subdirectory (libsubdir) prefix, and the target OS. +-- subdirectory (libsubdir) prefix, and the target OS. The body is generated +-- automatically by the build process. with Types; use Types; diff --git a/gcc/ada/sem_aggr.adb b/gcc/ada/sem_aggr.adb index 9b5efbccd42..d50942b024a 100644 --- a/gcc/ada/sem_aggr.adb +++ b/gcc/ada/sem_aggr.adb @@ -3156,7 +3156,11 @@ package body Sem_Aggr is end loop; else - Record_Def := Type_Definition (Parent (Base_Type (Typ))); + -- We take the underlying type to account for private types when + -- the original association had a box default. + + Record_Def := + Type_Definition (Parent (Underlying_Type (Base_Type (Typ)))); if Null_Present (Record_Def) then null; diff --git a/gcc/ada/table.adb b/gcc/ada/table.adb index 0953fe07062..3bf4eb69c87 100644 --- a/gcc/ada/table.adb +++ b/gcc/ada/table.adb @@ -83,6 +83,17 @@ package body Table is Set_Item (Table_Index_Type (Last_Val + 1), New_Val); end Append; + ---------------- + -- Append_All -- + ---------------- + + procedure Append_All (New_Vals : Table_Type) is + begin + for J in New_Vals'Range loop + Append (New_Vals (J)); + end loop; + end Append_All; + -------------------- -- Decrement_Last -- -------------------- diff --git a/gcc/ada/table.ads b/gcc/ada/table.ads index 79bf6705e33..2b398d762cd 100644 --- a/gcc/ada/table.ads +++ b/gcc/ada/table.ads @@ -187,6 +187,9 @@ package Table is -- i.e. the table size is increased by one, and the given new item -- stored in the newly created table element. + procedure Append_All (New_Vals : Table_Type); + -- Appends all components of New_Vals + procedure Set_Item (Index : Table_Index_Type; Item : Table_Component_Type); |