This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Problems with egcs and POSIX threads on AIX
- To: "Tom Williams" <tom dot williams at diversifiedsoftware dot com>
- Subject: Re: Problems with egcs and POSIX threads on AIX
- From: David Edelsohn <dje at watson dot ibm dot com>
- Date: Tue, 25 May 1999 18:33:45 -0400
- Cc: egcs-bugs at egcs dot cygnus dot com
>>>>> "Tom Williams" writes:
Tom> Making all in gthread
Tom> make[2]: Entering directory `/home/tomw/glib-1.2.3/gthread'
Tom> /bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. -I..
Tom> -I../gthread -DG_LOG_DOMAIN=\"GThread\" -g -O2 -Wall -ansi -pedantic
Tom> -D_REENTRANT -D_THREAD_SAFE -mthreads -c gthread.c
Tom> gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../gthread
Tom> -DG_LOG_DOMAIN=\"GThread\" -g -O2 -Wall -ansi -pedantic -D_REENTRANT
Tom> -D_THREAD_SAFE -mthreads -c -DPIC gthread.c -o gthread.lo
Tom> In file included from gthread.c:38:
Tom> ../glib.h:1286: warning: ANSI C does not allow macro with variable
Tom> arguments
Tom> ../glib.h:1289: warning: ANSI C does not allow macro with variable
Tom> arguments
Tom> ../glib.h:1292: warning: ANSI C does not allow macro with variable
Tom> arguments
Tom> In file included from ../glib.h:66,
Tom> from gthread.c:38:
Tom> ../glibconfig.h:84: warning: ANSI C forbids zero-size array `pad'
Tom> In file included from gthread-posix.c:34,
Tom> from gthread.c:42:
Tom> /usr/include/pthread.h:99: parse error before `0'
Tom> /usr/include/pthread.h:119: stray '\' in program
Tom> /usr/include/pthread.h:126: stray '\' in program
Tom> /usr/include/pthread.h:676: warning: This file contains more `}'s than
Tom> `{'s.
Tom> In file included from gthread.c:42:
Tom> gthread-posix.c:201: warning: This file contains more `}'s than `{'s.
Tom> make[2]: *** [gthread.lo] Error 1
It looks like something prior to inclusion of
/usr/include/pthread.h is confusing the GCC preprocessor. My guess is
that glib-1.2.3 does something special in its header files when __GNUC__
or some such GCC macro is defined. The additional stuff is not seen by
AIX cc when it compiles the file. Maybe glib is assuming something about
SVR4 or Linux, but something is wrong with its files in the presence of
GCC.
David