Subject: egcs-1.1 C++ problems
From: [email-masked] (Mumit Khan)

9 Sep 1998 09:04:02 -0700
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: [email-masked]

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:

    cc1bug.cc:1: warning: ANSI C++ forbids declaration `' with no type
    cc1bug.cc:1: 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.

Regards,
Mumit

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