A bad gcc 2.95 bug

H.J. Lu hjl@varesearch.com
Wed Jul 14 17:03:00 GMT 1999


Hi,

With egcs 1.1.2, I got

# gcc foo.cc
foo.cc:4: warning: declaration of `exit(int)' throws different exceptions
foo.cc:3: warning: previous declaration here

But with gcc 2.95 19990711, now I got
# gcc foo.cc
foo.cc:4: declaration of `exit(int)' throws different exceptions
foo.cc:3: previous declaration here

That is a bug fixed for egcs 1.1.2. Why does it return in gcc 2.95?
It will screw up glibc. It has to be fixed in gcc 2.95.

-- 
H.J. Lu (hjl@gnu.org)
---foo.cc-
extern "C" {
void exit (int);
void exit (int) __attribute__ ((__noreturn__));
void exit (int) throw () __attribute__ ((__noreturn__));
};


More information about the Libc-hacker mailing list