This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug ada/52123] [4.7/4.8 Regression] gcc bootstrap with ada fails on mingw target


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52123

--- Comment #6 from Rainer Emrich <rainer@emrich-ebersheim.de> 2012-12-19 10:55:55 UTC ---
Here's the status for gcc-4.8.0 rev. 194494 on x86_64-w64-mingw32:

g++ -c   -g -DIN_GCC   -fno-exceptions -fno-rtti -fasynchronous-unwind-tables
-W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual  -Wmissing-format-attribute
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings  -Wno-error
-DHAVE_CONFIG_H -I. -Iada -I../../../src/gcc-4.8.0/gcc
-I../../../src/gcc-4.8.0/gcc/ada -I../../../src/gcc-4.8.0/gcc/../include
-I./../intl -I../../../src/gcc-4.8.0/gcc/../libcpp/include
-I/SCRATCH/tmp.sTvWvLQnyU/install/include
-I/SCRATCH/tmp.sTvWvLQnyU/install/include
-I/SCRATCH/tmp.sTvWvLQnyU/install/include 
-I../../../src/gcc-4.8.0/gcc/../libdecnumber
-I../../../src/gcc-4.8.0/gcc/../libdecnumber/bid -I../libdecnumber
-I../../../src/gcc-4.8.0/gcc/../libbacktrace -DCLOOG_INT_GMP
-I/SCRATCH/tmp.sTvWvLQnyU/install/include
-I/SCRATCH/tmp.sTvWvLQnyU/install/include 
../../../src/gcc-4.8.0/gcc/ada/adaint.c -o ada/adaint.o
../../../src/gcc-4.8.0/gcc/ada/adaint.c: In function 'int
__gnat_check_OWNER_ACL(TCHAR*, DWORD, GENERIC_MAPPING)':
../../../src/gcc-4.8.0/gcc/ada/adaint.c:1986:53: error: invalid conversion from
'PSECURITY_DESCRIPTOR {aka void*}' to 'SECURITY_DESCRIPTOR* {aka
_SECURITY_DESCRIPTOR*}' [-fpermissive]
../../../src/gcc-4.8.0/gcc/ada/adaint.c: In function 'void
__gnat_set_OWNER_ACL(TCHAR*, DWORD, DWORD)':
../../../src/gcc-4.8.0/gcc/ada/adaint.c:2062:66: error: invalid conversion from
'DWORD {aka long unsigned int}' to 'ACCESS_MODE {aka _ACCESS_MODE}'
[-fpermissive]
In file included from ../../../src/gcc-4.8.0/gcc/ada/adaint.c:230:0:
D:/x86_64-w64-trunk/mingw/include/aclapi.h:67:25: error:   initializing
argument 4 of 'void BuildExplicitAccessWithNameW(PEXPLICIT_ACCESS_W, LPWSTR,
DWORD, ACCESS_MODE, DWORD)' [-fpermissive]
../../../src/gcc-4.8.0/gcc/ada/adaint.c: In function 'int
__gnat_portable_spawn(char**)':
../../../src/gcc-4.8.0/gcc/ada/adaint.c:2387:61: error: invalid conversion from
'const char* const*' to 'char* const*' [-fpermissive]
In file included from D:/x86_64-w64-trunk/mingw/include/unistd.h:11:0,
                 from ../../../src/gcc-4.8.0/gcc/system.h:256,
                 from ../../../src/gcc-4.8.0/gcc/ada/adaint.c:106:
D:/x86_64-w64-trunk/mingw/include/process.h:177:20: error:   initializing
argument 3 of 'intptr_t spawnvp(int, const char*, char* const*)' [-fpermissive]
../../../src/gcc-4.8.0/gcc/ada/adaint.c: In function 'void add_handle(HANDLE,
int)':
../../../src/gcc-4.8.0/gcc/ada/adaint.c:2543:67: error: invalid conversion from
'void*' to 'void**' [-fpermissive]
../../../src/gcc-4.8.0/gcc/ada/adaint.c:2545:60: error: invalid conversion from
'void*' to 'int*' [-fpermissive]
../../../src/gcc-4.8.0/gcc/ada/adaint.c: In function 'char*
__gnat_locate_exec_on_path(char*)':
../../../src/gcc-4.8.0/gcc/ada/adaint.c:2934:16: error: invalid conversion from
'void*' to 'TCHAR* {aka wchar_t*}' [-fpermissive]
../../../src/gcc-4.8.0/gcc/ada/adaint.c:2944:15: error: invalid conversion from
'void*' to 'char*' [-fpermissive]
make[3]: *** [ada/adaint.o] Error 1
g++ -c   -g -DIN_GCC   -fno-exceptions -fno-rtti -fasynchronous-unwind-tables
-W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual  -Wmissing-format-attribute
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H
-I. -Iada -I../../../src/gcc-4.8.0/gcc -I../../../src/gcc-4.8.0/gcc/ada
-I../../../src/gcc-4.8.0/gcc/../include -I./../intl
-I../../../src/gcc-4.8.0/gcc/../libcpp/include
-I/SCRATCH/tmp.sTvWvLQnyU/install/include
-I/SCRATCH/tmp.sTvWvLQnyU/install/include
-I/SCRATCH/tmp.sTvWvLQnyU/install/include 
-I../../../src/gcc-4.8.0/gcc/../libdecnumber
-I../../../src/gcc-4.8.0/gcc/../libdecnumber/bid -I../libdecnumber
-I../../../src/gcc-4.8.0/gcc/../libbacktrace -DCLOOG_INT_GMP
-I/SCRATCH/tmp.sTvWvLQnyU/install/include
-I/SCRATCH/tmp.sTvWvLQnyU/install/include 
../../../src/gcc-4.8.0/gcc/ada/initialize.c -o ada/initialize.o
../../../src/gcc-4.8.0/gcc/ada/initialize.c: In function 'void append_arg(int*,
LPWSTR, LPWSTR, char***, int*, int)':
../../../src/gcc-4.8.0/gcc/ada/initialize.c:91:56: error: invalid conversion
from 'void*' to 'LPWSTR {aka wchar_t*}' [-fpermissive]
../../../src/gcc-4.8.0/gcc/ada/initialize.c:98:65: error: invalid conversion
from 'void*' to 'LPWSTR {aka wchar_t*}' [-fpermissive]
../../../src/gcc-4.8.0/gcc/ada/initialize.c: In function 'void
__gnat_initialize(void*)':
../../../src/gcc-4.8.0/gcc/ada/initialize.c:206:44: error: invalid conversion
from 'void*' to 'LPWSTR {aka wchar_t*}' [-fpermissive]
make[3]: *** [ada/initialize.o] Error 1
g++ -c   -g -DIN_GCC   -fno-exceptions -fno-rtti -fasynchronous-unwind-tables
-W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual  -Wmissing-format-attribute
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H
-I. -Iada -I../../../src/gcc-4.8.0/gcc -I../../../src/gcc-4.8.0/gcc/ada
-I../../../src/gcc-4.8.0/gcc/../include -I./../intl
-I../../../src/gcc-4.8.0/gcc/../libcpp/include
-I/SCRATCH/tmp.sTvWvLQnyU/install/include
-I/SCRATCH/tmp.sTvWvLQnyU/install/include
-I/SCRATCH/tmp.sTvWvLQnyU/install/include 
-I../../../src/gcc-4.8.0/gcc/../libdecnumber
-I../../../src/gcc-4.8.0/gcc/../libdecnumber/bid -I../libdecnumber
-I../../../src/gcc-4.8.0/gcc/../libbacktrace -DCLOOG_INT_GMP
-I/SCRATCH/tmp.sTvWvLQnyU/install/include
-I/SCRATCH/tmp.sTvWvLQnyU/install/include 
../../../src/gcc-4.8.0/gcc/ada/seh_init.c -o ada/seh_init.o
../../../src/gcc-4.8.0/gcc/ada/seh_init.c: In function 'Exception_Data*
__gnat_map_SEH(EXCEPTION_RECORD*, const char**)':
../../../src/gcc-4.8.0/gcc/ada/seh_init.c:94:62: error: invalid conversion from
'void*' to 'FARPROC {aka long long int (*)()}' [-fpermissive]
In file included from D:/x86_64-w64-trunk/mingw/include/windows.h:70:0,
                 from ../../../src/gcc-4.8.0/gcc/ada/seh_init.c:68:
D:/x86_64-w64-trunk/mingw/include/winbase.h:2406:29: error:   initializing
argument 1 of 'WINBOOL IsBadCodePtr(FARPROC)' [-fpermissive]
make[3]: *** [ada/seh_init.o] Error 1


Proposed patch, tested on x86_64-w64-mingw32:

Index: ada/adaint.c
===================================================================
--- ada/adaint.c    (Revision 194496)
+++ ada/adaint.c    (Arbeitskopie)
@@ -1982,7 +1982,7 @@ __gnat_check_OWNER_ACL
      GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION,
      NULL, 0, &nLength);

-  if ((pSD = (PSECURITY_DESCRIPTOR) HeapAlloc
+  if ((pSD = (SECURITY_DESCRIPTOR *) HeapAlloc
        (GetProcessHeap (), HEAP_ZERO_MEMORY, nLength)) == NULL)
     return 0;

@@ -2059,7 +2059,7 @@ __gnat_set_OWNER_ACL
     return;

   BuildExplicitAccessWithName
-    (&ea, username, AccessPermissions, AccessMode, NO_INHERITANCE);
+    (&ea, username, AccessPermissions, (ACCESS_MODE) AccessMode,
NO_INHERITANCE);

   if (AccessMode == SET_ACCESS)
     {
@@ -2384,7 +2384,7 @@ __gnat_portable_spawn (char *args[])
   strcat (args[0], args_0);
   strcat (args[0], "\"");

-  status = spawnvp (P_WAIT, args_0, (const char* const*)args);
+  status = spawnvp (P_WAIT, args_0, (char* const*)args);

   /* restore previous value */
   free (args[0]);
@@ -2540,9 +2540,9 @@ add_handle (HANDLE h, int pid)
     {
       plist_max_length += 1000;
       HANDLES_LIST =
-        xrealloc (HANDLES_LIST, sizeof (HANDLE) * plist_max_length);
+        (void **) xrealloc (HANDLES_LIST, sizeof (HANDLE) * plist_max_length);
       PID_LIST =
-        xrealloc (PID_LIST, sizeof (int) * plist_max_length);
+        (int *) xrealloc (PID_LIST, sizeof (int) * plist_max_length);
     }

   HANDLES_LIST[plist_length] = h;
@@ -2931,7 +2931,7 @@ __gnat_locate_exec_on_path (char *exec_n

   #define EXPAND_BUFFER_SIZE 32767

-  wapath_val = alloca (EXPAND_BUFFER_SIZE);
+  wapath_val = (TCHAR *) alloca (EXPAND_BUFFER_SIZE);

   wapath_val [0] = '.';
   wapath_val [1] = ';';
@@ -2941,7 +2941,7 @@ __gnat_locate_exec_on_path (char *exec_n

   if (!res) wapath_val [0] = _T('\0');

-  apath_val = alloca (EXPAND_BUFFER_SIZE);
+  apath_val = (char *) alloca (EXPAND_BUFFER_SIZE);

   WS2SC (apath_val, wapath_val, EXPAND_BUFFER_SIZE);
   return __gnat_locate_exec (exec_name, apath_val);
Index: ada/initialize.c
===================================================================
--- ada/initialize.c    (Revision 194496)
+++ ada/initialize.c    (Arbeitskopie)
@@ -88,14 +88,14 @@ append_arg (int *index, LPWSTR dir, LPWS
     {
       /* no dir prefix */
       dirlen = 0;
-      fullvalue = xmalloc ((vallen + 1) * sizeof(TCHAR));
+      fullvalue = (LPWSTR) xmalloc ((vallen + 1) * sizeof(TCHAR));
     }
   else
     {
       /* Add dir first */
       dirlen = _tcslen (dir);

-      fullvalue = xmalloc ((dirlen + vallen + 1) * sizeof(TCHAR));
+      fullvalue = (LPWSTR) xmalloc ((dirlen + vallen + 1) * sizeof(TCHAR));
       _tcscpy (fullvalue, dir);
     }

@@ -203,7 +203,7 @@ __gnat_initialize (void *eh ATTRIBUTE_UN
              if (ldir != NULL)
                {
              int n = ldir - wargv[k] + 1;
-             dir = xmalloc ((n + 1) * sizeof (TCHAR));
+             dir = (LPWSTR) xmalloc ((n + 1) * sizeof (TCHAR));
              _tcsncpy (dir, wargv[k], n);
              dir[n] = _T('\0');
                }
Index: ada/seh_init.c
===================================================================
--- ada/seh_init.c    (Revision 194496)
+++ ada/seh_init.c    (Arbeitskopie)
@@ -91,7 +91,7 @@ __gnat_map_SEH (EXCEPTION_RECORD* Except
       */
       if ((ExceptionRecord->ExceptionInformation[1] & 3) != 0
       || IsBadCodePtr
-      ((void *)(ExceptionRecord->ExceptionInformation[1] + 4096)))
+      ((FARPROC)(ExceptionRecord->ExceptionInformation[1] + 4096)))
     {
       *msg = "EXCEPTION_ACCESS_VIOLATION";
       return &program_error;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]