This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
flag_complex_method = 2 in C++?
- From: Paolo Carlini <pcarlini at suse dot de>
- To: gcc at gcc dot gnu dot org
- Cc: Mark Mitchell <mark at codesourcery dot com>, Jakub Jelinek <jakub at redhat dot com>, Richard Guenther <rguenther at suse dot de>, Doug Gregor <dgregor at cs dot indiana dot edu>
- Date: Thu, 05 Jul 2007 17:06:07 +0200
- Subject: flag_complex_method = 2 in C++?
Hi,
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?
Paolo.
///////////
Index: c-opts.c
===================================================================
*** c-opts.c (revision 126053)
--- c-opts.c (working copy)
*************** c_common_post_options (const char **pfil
*** 1140,1146 ****
/* C99 requires special handling of complex multiplication and division;
-ffast-math and -fcx-limited-range are handled in process_options. */
! if (flag_isoc99)
flag_complex_method = 2;
/* If we're allowing C++0x constructs, don't warn about C++0x
--- 1140,1146 ----
/* C99 requires special handling of complex multiplication and division;
-ffast-math and -fcx-limited-range are handled in process_options. */
! if (flag_isoc99 || c_dialect_cxx ())
flag_complex_method = 2;
/* If we're allowing C++0x constructs, don't warn about C++0x