flag_complex_method = 2 in C++?

Mark Mitchell mark@codesourcery.com
Thu Jul 5 17:29:00 GMT 2007

Richard Guenther wrote:

>> I'm having a look to libstdc++/30482, which basically is C++ issue: Jakub
>> basically raises the issue of whether we want to use by default the
>> C99-conforming division in C++ too. Personally, I would be in favor of
>> enabling it unconditionally, modulo maybe a performance check (Richard...).
>> Otherwise, we should at least enable it for C++0x, which refers to C99 as C
>> language, of course.
>> What do people think?
> Well, I agree to enable this by default.

I'd prefer not to introduce a situation in which compiling the same code
with "gcc" and with "g++" behaves differently and which performs worse
in one case than the other.  Users expect the C subset of C++ to perform
like C.

If we want the C99 rules, let's just turn them on everywhere, and then
let users who want "quick and dirty" complex arithmetic to use the flag
that turns that on.  And, turn that on by default for -ffast-math?

Mark Mitchell
(650) 331-3385 x713

More information about the Gcc mailing list