This is the mail archive of the gcc-bugs@gcc.gnu.org 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]

egcs-2.91.40 and ddd-1998-06-11 : preprocessor problem ?


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

Ive 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


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