[Bug preprocessor/63831] [5 Regression] r217292 causes segfaults with -MM

iains at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Nov 22 15:35:00 GMT 2014


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63831

--- Comment #13 from Iain Sandoe <iains at gcc dot gnu.org> ---
So at stage #3 building libada, we see that s-oscons.{adb,h} are empty. 
Looking at the error log :

ln: rts/system.ads: File exists
In file included from /usr/include/sys/time.h:78:0,
                 from /GCC/gcc-trunk/gcc/ada/gsocket.h:183,
                 from /GCC/gcc-trunk/gcc/ada/s-oscons-tmplt.c:103:
/usr/include/sys/_structs.h: In function ‘__has_attribute__’:
/usr/include/sys/_structs.h:186:3: error: storage class specified for parameter
‘fd_set’
 } fd_set;
   ^
/usr/include/sys/_structs.h:192:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘{’ token
 {
 ^
In file included from /GCC/gcc-trunk/gcc/ada/gsocket.h:183:0,
                 from /GCC/gcc-trunk/gcc/ada/s-oscons-tmplt.c:103:
/usr/include/sys/time.h:82:25: error: storage class specified for parameter
‘time_t’
 typedef __darwin_time_t time_t;

=== note in the stuff below:
Availability.h includes AvailabilityInternal.h which uses:
    #ifdef __has_attribute
        #if __has_attribute(availability)
            /* use better attributes if possible */

what's not obvious is why that's causing a failure in this context (but passing
elsewhere in the compile.

[of course, could be buggy system headers, but then clang works on this
platform, so I suppose it should have been exercised.]

I don't think I can share darwin headers here - but it's likely that we can
find the key ones on the apple OpenSource server, if you don't have access to
them.

In the meantime I'll see if I can narrow things down.


==== /GCC/gcc-trunk/gcc/ada/s-oscons-tmplt.c
    102 
    103 #include "gsocket.h"
    104 
==== /GCC/gcc-trunk/gcc/ada/gsocket.h
    180 #if defined (__vxworks) && ! defined (__RTP__)
    181 #include <sys/times.h>
    182 #else
    183 #include <sys/time.h>
    184 #endif
==== /usr/include/sys/time.h
     64 #ifndef _SYS_TIME_H_
     65 #define _SYS_TIME_H_
     66 
     67 #include <sys/cdefs.h>
     68 #include <sys/_types.h>
     69 #include <Availability.h>
     70 
     71 /*
     72  * [XSI] The fd_set type shall be defined as described in
<sys/select.h>.
     73  * The timespec structure shall be defined as described in <time.h>
     74  */
     75 #define __need_fd_set
     76 #define __need_struct_timespec
     77 #define __need_struct_timeval
     78 #include <sys/_structs.h>
==== /usr/include/sys/_structs.h
    183 __BEGIN_DECLS
    184 typedef struct fd_set {
    185         __int32_t       fds_bits[__DARWIN_howmany(__DARWIN_FD_SETSIZE,
__DARWIN_NFDBITS)];
    186 } fd_set;
    187 __END_DECLS


More information about the Gcc-bugs mailing list