]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Fri, 17 Apr 2009 10:01:17 +0000 (12:01 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Fri, 17 Apr 2009 10:01:17 +0000 (12:01 +0200)
2009-04-17  Nicolas Roche  <roche@adacore.com>

* initialize.c (__gnat_initialize): remove MAX_PATH limitation on each
argument length.

2009-04-17  Gary Dismukes  <dismukes@adacore.com>

* sem_elim.adb (Eliminate_Error_Msg): Minor change to error message to
cover both calls and attribute references ("call" => "reference").

2009-04-17  Ed Schonberg  <schonberg@adacore.com>

* sem_ch3.adb (Analyze_Subtype_Declaration): A subtype of an access
type for which Storage_Size is set to 0 is legal in a pure unit.

From-SVN: r146237

gcc/ada/ChangeLog
gcc/ada/initialize.c
gcc/ada/sem_ch3.adb
gcc/ada/sem_elim.adb

index 2756c8cecc9194bcfa2a2fbf93ae9a370fdb423d..df057e59aead8790b062a525f6dc65cb22267ebd 100644 (file)
@@ -1,3 +1,18 @@
+2009-04-17  Nicolas Roche  <roche@adacore.com>
+
+       * initialize.c (__gnat_initialize): remove MAX_PATH limitation on each
+       argument length.
+
+2009-04-17  Gary Dismukes  <dismukes@adacore.com>
+
+       * sem_elim.adb (Eliminate_Error_Msg): Minor change to error message to
+       cover both calls and attribute references ("call" => "reference").
+
+2009-04-17  Ed Schonberg  <schonberg@adacore.com>
+
+       * sem_ch3.adb (Analyze_Subtype_Declaration): A subtype of an access
+       type for which Storage_Size is set to 0 is legal in a pure unit.
+
 2009-04-17  Thomas Quinot  <quinot@adacore.com>
 
        * exp_ch7.adb: Minor reformatting
index ef51f709857db18c194f3286c3701ae0f0f4517f..b7b905b49a2e2eb05f0541c7a521bf49f9be3aa5 100644 (file)
@@ -99,10 +99,10 @@ __gnat_initialize (void *eh)
 
    /* Adjust gnat_argv to support Unicode characters. */
    {
-     char arg_utf8[MAX_PATH];
      LPWSTR *wargv;
      int wargc;
      int k;
+     int size;
 
      wargv = CommandLineToArgvW (GetCommandLineW(), &wargc);
 
@@ -113,9 +113,9 @@ __gnat_initialize (void *eh)
 
         for (k=0; k<wargc; k++)
           {
-            WS2SC (arg_utf8, wargv[k], MAX_PATH);
-            gnat_argv[k] = (char *) xmalloc (strlen (arg_utf8) + 1);
-            strcpy (gnat_argv[k], arg_utf8);
+            size = WS2SC (NULL, wargv[k], 0);
+            gnat_argv[k] = (char *) xmalloc (size + 1);
+            WS2SC (gnat_argv[k], wargv[k], size);
           }
 
         LocalFree (wargv);
index 8b9071a6bde16a2bc5997ebeed24fd9b60094d6c..243c9f7a3d789dc173b95cf919dc2712e2e976f8 100644 (file)
@@ -3606,11 +3606,13 @@ package body Sem_Ch3 is
 
                --  A Pure library_item must not contain the declaration of a
                --  named access type, except within a subprogram, generic
-               --  subprogram, task unit, or protected unit (RM 10.2.1(16)).
+               --  subprogram, task unit, or protected unit, or if it has
+               --  a specified Storage_Size of zero (RM05-10.2.1(15.4-15.5)).
 
                if Comes_From_Source (Id)
                  and then In_Pure_Unit
                  and then not In_Subprogram_Task_Protected_Unit
+                 and then not No_Pool_Assigned (Id)
                then
                   Error_Msg_N
                     ("named access types not allowed in pure unit", N);
index c15f9cfb3bc3fe1d24619e53c6eaab46f5664a82..6dd7021e7cf15b236ca0c0de773df08c8651ea47 100644 (file)
@@ -671,7 +671,7 @@ package body Sem_Elim is
       for J in Elim_Entities.First .. Elim_Entities.Last loop
          if E = Elim_Entities.Table (J).Subp then
             Error_Msg_Sloc := Sloc (Elim_Entities.Table (J).Prag);
-            Error_Msg_NE ("cannot call subprogram & eliminated #", N, E);
+            Error_Msg_NE ("cannot reference subprogram & eliminated #", N, E);
             return;
          end if;
       end loop;