Your g++ breaks glibc.

Mark Mitchell mark@codesourcery.com
Sat Jul 31 22:30:00 GMT 1999


>>>>> "H" == H J Lu <hjl@varesearch.com> writes:

    H> It is ncurses 4.2. However, I believe the problem is in
    H> autoconf and I don't even know if there is a reasonable fix for
    H> autoconf since it may not know which one,

    H> extern "C" void exit(int); extern "C" void exit(int) throw ();

    H> to use for a given system. gcc 2.95 works with

    H> #include <stdlib.h> extern "C" void exit(int);

    H> but not

    H> extern "C" void exit(int); #include <stdlib.h>

    H> I don't see any reason to allow one and not the other.

Right.  That's why Jason & I approved your patch.  In the long term,
though, *both* orders are going to be disallowed, which will still be
consistent.

Saying that there's no way to know which one to use is like saying
there's no way to know whether or not `strcpy' is prototyped to `const
char*' or `char *' arguments.  Some systems do one, some the other,
but portable code must deal with both.  Usually, the easiest way to do
this is to not declare functions that appear in system headers.

Please track down the buggy code, and report it to the appropriate
source.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com



More information about the Gcc-patches mailing list