This is the mail archive of the gcc@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]

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

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