egcs-1.1 C++ problems

Mumit Khan
Tue Sep 8 08:03:00 GMT 1998

There are few cases of compiler crash using egcs-1.1 C++ that you may also
run into. These are fixed in my private sources, and I'll do an update
after running the testsuite.

for example, the following crashes the compiler:
  extern "C" foo ();

It still doesn't work with my changes, but at least it stops the crash and
prints the following error message: warning: ANSI C++ forbids declaration `' with no type abstract declarator `int' used as declaration

This is a bug in egcs-1.1 and I've reported this to the egcs folks.

As a workaround, you need to do the following (and the right thing to do):

  extern "C" int foo ();

This also means that folks using old X11 headers will tons of trouble
since X11 leaves out the return type from lots of the prototypes. You
can add "int" as a workaround, which is a good thing in the long term
in any event.

The other problem has to do getting multiple definition errors in some
cases where you shouldn't (Thanks to Colin Peters for reporting the
bug). I've fixed this and will be in the update.


For help on using this list (especially unsubscribing), send a message to
"" with one line of text: "help".

More information about the Cygwin mailing list