-fno-exceptions and libgcc.a

Paul Koning pkoning@xedia.com
Mon Oct 6 06:37:00 GMT 1997


>>>>> "Mark" == Mark Mitchell <mmitchell@usa.net> writes:

>>>>> "Per" == Per Bothner <bothner@cygnus.com> writes:

 >>> It is reasonable to either change the default for exception
 >>> handling to off for C,

 Per> I don't understand why there is even any discussion of this.
 Per> The default for C *has* to -fno-exceptions, unless there is *no*
 Per> cost for code that does not use the exceptions.  Anything else
 Per> is a public relations disaster in terms of the perceived code
 Per> quality of gcc.  This *must* be fixed before egcs (or gcc 2.8)
 Per> is released.

 Mark> I suggest a different scheme:

 Mark> o The default remains -fno-exceptions when compiling.

 Mark> o At link-time, if gcc is used to link the executable, we
 Mark> remove the .eh_frame section.  If g++/c++ is used, we keep it.

Hm. I tend to forget "g++" even exists -- I always compile everything
by calling "gcc" and letting it sort out what to do with the file.
That's the whole point of the existence of the gcc front end driver,
isn't it?

So if I say "gcc foo.cc" it would be nice to have the Right Thing
happen.  It is undesirable to have to change makefiles.

Conversely, you also need a solution for those who invoke "ld"
directly (as opposed to indirectly via gcc or g++).

	paul



More information about the Gcc mailing list