This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch] Move Objective-C runtime flags to modern options system.


On Nov 10, 2011, at 9:40 AM, Iain Sandoe wrote:
> Thanks for catching that --- brainstorm on my part ... the code under discussion should have been #ifndef OBCPLUS

There is no prohibition against C having exceptions, so, doesn't matter if you turn C++ off, you can still throw through C code, so turning on exceptions is reasonable.

> Moreover, there is no personality routine in m32 NeXT libobjc, so if one tries to engage the zero-cost exceptions, one gets a link error (and generates a load of unused eh data).  I can work around that if there is still reason to have "-fexceptions" on.

No, this must be wrong:

$ cat t.c
void bar() {
}

void foo() {
  bar();
}


int main() {
  return 0;
}
$ gcc -fexceptions t.c
$ gcc -m32 -fexceptions t.c
$ 

Like I said, it does work, one can count on it working and it is useful, you can't break it.  And next week, they'll add catching and throwing to C, and when they do, it still has to just work.  :-)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]