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

[Bug libstdc++/48760] [4.6 / 4.7 Regression (?)] std::complex constructor buggy in the face of NaN's


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48760

Gabriel Dos Reis <gdr at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at redhat dot com

--- Comment #10 from Gabriel Dos Reis <gdr at gcc dot gnu.org> 2011-04-25 21:38:59 UTC ---
(In reply to comment #9)
> I guess, in the 4.6.1 time frame we can only workaround the issue in C++03 mode
> by doing the piecewise work in the body. I can maybe help for the compiler work
> too but I need more guidance: is there an agreement about the C1X inspired
> builtin suggested by Joseph? In case, can I have a more specific reference?
> 
> I'm adding in CC Richi too, in case he has additional tips and/or hints about
> the builtin work..

I believe in 4.6.1 it should still be possible to have the initialization
from components.  All we need is to be able to write

    complex(float __r, float __i) : _M_value{__r,__i} { }

or

    complex(float __r, float __i) : _M_value({__r, __i}) { }

the work that people are testing really isn't C++03, it is C++0x.
It is fine if the C people don't want it.  But in C++0x, we already
have the syntax (so no parser surgery is needed).  All that remains is
to have the C++ front-end elaborate that syntax into the proper 
initialization (ideal outcome) or a sequence of assignment (less ideal.)
Note that we already have that syntax for iniialization of array members
and a _Complex is supposed to behave like a 2-element array...

It is good that Richi is in the CC (as a RM) but, I suspect Jason should
be too. 

-- Gaby


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