This is the mail archive of the 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]

Re: pthread.h INITIALIZER macros on solaris (solaris9 & 10 need fixes)

 >  > Based on what you showed me, I suspect the results should be
 >  > consistent with solaris7, i.e. it'll complain about
 >  > PTHREAD_ONCE_INIT, and with -ansi it'll complain on
 > $ gcc -c -W -Wall -ansi test.c
 > test.c: In function `test_it':
 > test.c:17: warning: missing initializer
 > test.c:17: warning: (near initialization for `pc.__pthread_cond_flags')

Um, that's completely unexpected! :-)

Solaris8 shouldn't complain about the COND macro at all since that is
supposedly "fixed".  I get warnings for RWLOCK & ONCE on solaris7:

% gcc -c -W -Wall -ansi foo.c
pthr.c: In function 'foo':
pthr.c:8: warning: missing braces around initializer
pthr.c:8: warning: (near initialization for 'prwl.__pthread_rwlock_pad1[0]')
pthr.c:9: warning: missing braces around initializer
pthr.c:9: warning: (near initialization for 'po.__pthread_once_pad')

Can you help me understand the discrepancy?  Were you testing mainline
on solaris8 or some other version of gcc?  What fixes if any were
applied to pthread.h for that gcc on that box?

Kaveh R. Ghazi

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