diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-04-17 12:01:17 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-04-17 12:01:17 +0200 |
commit | 03f050b6b4f0b051bbd9ddf7061b5002808ed052 (patch) | |
tree | 743b5a8129e06c619ef80fa5f1948d96e7408beb /gcc | |
parent | bf327c92ead248cae1afba338d72bb7116dfc783 (diff) | |
download | gcc-03f050b6b4f0b051bbd9ddf7061b5002808ed052.zip gcc-03f050b6b4f0b051bbd9ddf7061b5002808ed052.tar.gz gcc-03f050b6b4f0b051bbd9ddf7061b5002808ed052.tar.bz2 |
[multiple changes]
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/ChangeLog | 15 | ||||
-rw-r--r-- | gcc/ada/initialize.c | 8 | ||||
-rw-r--r-- | gcc/ada/sem_ch3.adb | 4 | ||||
-rw-r--r-- | gcc/ada/sem_elim.adb | 2 |
4 files changed, 23 insertions, 6 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 2756c8c..df057e5 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -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 diff --git a/gcc/ada/initialize.c b/gcc/ada/initialize.c index ef51f70..b7b905b 100644 --- a/gcc/ada/initialize.c +++ b/gcc/ada/initialize.c @@ -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); diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index 8b9071a..243c9f7 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -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); diff --git a/gcc/ada/sem_elim.adb b/gcc/ada/sem_elim.adb index c15f9cfb..6dd7021 100644 --- a/gcc/ada/sem_elim.adb +++ b/gcc/ada/sem_elim.adb @@ -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; |