kitschen <[EMAIL PROTECTED]> writes:

> Paul Pluzhnikov wrote:
>
>> Obviously, if you are *using* exceptions, you can't just tell the
>> compiler "ignore what I wrote, and compile something else instead".
>
> So what's the -fno-exceptions for then?

To omit special tables which are necessary to properly unwind stack
through code that doesn't catch or throw.

> If you are not using
> exceptions I expect the compiler to not create the corresponding code
> (ie stack unwinding etc).

Your expectations are somewhat incorrect:
even if *your* code doesn't use exceptions, it may call other code
that throws, and it may be called by other code that tries to catch.

> As I have exceptions in my code, I would expect the option
> -fno-exceptions to create code which just crashes/exits the program in
> case of a thrown exception. Am I wrong?

Well, you obviously are wrong (at least as far as g++ is concerned):
instead of doing what you expect; it simply refuses to compile your code.

As to whether what you desire is reasonable; I don't believe so,
but that's a matter of opinion.

Cheers,
-- 
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
_______________________________________________
help-gplusplus mailing list
help-gplusplus@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gplusplus

Reply via email to