This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
egcs-2.91.40 and ddd-1998-06-11 : preprocessor problem ?
- To: egcs-bugs at cygnus dot com
- Subject: egcs-2.91.40 and ddd-1998-06-11 : preprocessor problem ?
- From: Markus Kossmann <markus dot kossmann at inka dot de>
- Date: Fri, 12 Jun 1998 17:57:58 +0200
- Organization: home
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