egcs-1.1...
Sven Radej
sven@lisa.exp.univie.ac.at
Thu Sep 17 12:58:00 GMT 1998
Hi,
I have problems with the following code:
#include <sys/wait.h>
(...)
int KProcess::exitStatus()
{
int _status = status; //status is global
return WEXITSTATUS(_status);
}
I tested it on gcc-2.7.2 and __USE_BSD is defined there (and passes). I am
sure that egcs-1.0.3 could compile this, too.
egcs-1.1 cannot parse this: (in sys/wait.h):
(...)
#ifdef __USE_BSD
/* Lots of hair to allow traditional BSD use of `union wait'
as well as POSIX.1 use of `int' for the status word. */
#ifdef __GNUC__
#define __WAIT_INT(status) \
(__extension__ ({ union { __typeof(status) __in; int __i; } __u; \
__u.__in = (status); __u.__i; }))
#else
(...)
So it cannot use (in same file):
(...)
#define WEXITSTATUS(status) __WEXITSTATUS(__WAIT_INT(status))
(...)
Claiming:
kprocess.cpp: In method `int KProcess::exitStatus()':
kprocess.cpp:278: `_status' undeclared (first use this function)
kprocess.cpp:278: warning: ANSI C++ forbids declaration `__in' with no type
While parsing this lines in source:
int KProcess::exitStatus()
{
int _status = status;
return WEXITSTATUS(_status);
}
I don't know if libc-5.4.44 does something wrong or is it egcs.
This is intel, linux 2.0.34, libc5.4.44, egcs 1.1.
egcs was compiled with -O2 flags, --enable-shared and --prefix=/usr
Everything else runs, and it runs better than with egcs-1.0.3, faster,
smaller, sexier...
Except of this little problem (and I have found this bug in other non-KDE
apps too), KDE compiles wery fine - and is required for koffice programs due
to corba-stuff and exceptions. So would you please be so kind to remove from
your FAQ question 26 :-) ?
Thanks,
--
Sven Radej
KDE developer
radej@kde.org
Visit http://www.kde.org
More information about the Gcc-bugs
mailing list