egcs-2.91.40 and ddd-1998-06-11 : preprocessor problem ?
Markus Kossmann
markus.kossmann@inka.de
Fri Jun 12 09:01:00 GMT 1998
When compiling ddd-1998-06-11 with gcc version egcs-2.91.40 19980608
(gcc2 ss-980502 experimental) on a i686-pc-linux-gnulibc1 system (
libc-5.4.45) it fails with
c++ -DHAVE_CONFIG_H -DNDEBUG -O2 -g -W -Wall -Wno-uninitialized
-fexternal-templates -felide-constructors -fconserve-space -c -I. -I.
-I./.. -I/usr/X11R6/include -o sigName.o sigName.C
sigName.C: In function `char * statusName(int)':
sigName.C:57: `status' undeclared (first use this function)
sigName.C:57: (Each undeclared identifier is reported only once
sigName.C:57: for each function it appears in.)
sigName.C:57: warning: ANSI C++ forbids declaration `__in' with no
type
sigName.C:61: warning: ANSI C++ forbids declaration `__in' with no
type
sigName.C:64: warning: ANSI C++ forbids declaration `__in' with no
type
sigName.C:65: warning: ANSI C++ forbids declaration `__in' with no
type
sigName.C:66: warning: ANSI C++ forbids declaration `__in' with no
type
sigName.C:67: warning: ANSI C++ forbids declaration `__in' with no
type
Iôve reduced the problem to the attached testcase sigName.C which
fails with :
mk@emil2:/home/mk/testcase > g++ -c -o sigName.o sigName.C
sigName.C: In function `char * statusName(int)':
sigName.C:15: `status' undeclared (first use this function)
sigName.C:15: (Each undeclared identifier is reported only once
sigName.C:15: for each function it appears in.)
sigName.C:15: warning: ANSI C++ forbids declaration `__in' with no
type
That problem seems to be caused by a collision of the usage of
"status" as argument in a makro in <sys/wait.h> and in the function
statusName , as you see in the attached preprocessed sources .
--
------------------------------------------------------------------------------
Markus <markus.kossmann@inka.de> (Markus Kossmann)
sigName.ii.gz
sigName.C
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sigName.C
Type: text/x-c
Size: 358 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/19980612/8ce5f762/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sigName.ii.gz
Type: application/x-gzip
Size: 1180 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/19980612/8ce5f762/attachment-0001.bin>
More information about the Gcc-bugs
mailing list