g++ just exits without any message, egcs-970910 and egcs-970907
Torbjorn Lindgren
tl@funcom.no
Fri Sep 12 04:10:00 GMT 1997
On Fri, 12 Sep 1997, Torbjorn Lindgren wrote:
> It starts by spitting out several warnings (replicated last in the
> message), and then it just exits with error code 1 (according to make)
> without generating any output. There are no errors, and none of the
Oops. As someone noticed, one of the messages *are* an error, which I
should have spotted.
Guess I have been spoiled by compiler who *TELL* you what it consider to
be an error, not just doesn't label it as a warning! (I thought gcc did!)
Which brings up a point: Wouldn't it be good if egcs *labeled* error
messages, the same way it already does with warning messages!
> /usr/src/ACE_wrappers/ace/OS.i:440: declaration of C function `int getrusage(int, struct rusage *)' conflicts with
> /usr/include/sys/resource.h:45: previous declaration `int getrusage(enum __rusage_who, struct rusage *)' here
This is of course an error, not a warning, since it's missing the warning
tag! Fixing this makes the compile continue.
The error is actually in /usr/include/sys/resource.h from glib-2.0.5, not
ACE version (according to Single UNIX Specification the first parameter
should be an int, not an enum), argh!
Is an enum supposed to be 'compatible' with a 'int' or not in C++? It's
either an error in glibc 2.0.5, egcs or something that will need to be
'fixincluded' away :-) If C++ doesn't equate enum with int's the best
cause of action is probably to file a bug report with the glibc team.
At the moment I'm working it around by telling ACE that I do have that
definition already (adding an #ifdef around the ACE definition).
FYI: The two conflicting definitions is:
int getrusage (enum __rusage_who __who, struct rusage *__usage));
int getrusage (int who, struct rusage *rusage);
And the Single UNIX Specification, Version 2 blesses:
int getrusage(int who, struct rusage *r_usage);
--
Torbjörn Lindgren
E-mail: tl@funcom.com
If Santa ever DID deliver presents on Christmas Eve, he's dead now.
More information about the Gcc
mailing list