Hey, In a header file, we define a macro if pthread is available at configure time, like that:
#ifdef HAVE_PTHREAD # define LK(x) pthread_mutex_t x #else # defne LK(x) #endif When we use it, for example in a structure: struct foo { int i; LK(lock); }; So, when pthread support is disabled, we have struct foo { int i; ; }; and suncc reports the warning: warning: syntax error: empty member declaration One solution would be to put the ; inside the define, and remove the ; in the structure. But then editors are completly lost when indenting the source code. it seems to me that empty declarations are allowed (a semicolon is a valid empty statement). Am I wrong ? And is there a compiler option to remove the warning ? Vincent Torri
_______________________________________________ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/opensolaris-code