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 middle-end/23497] [4.1 regression] Bogus 'is used uninitialized...' warning about std::complex<T>



------- Comment #14 from mmitchel at gcc dot gnu dot org  2005-11-15 19:23 -------
There is nothing wrong with the code in Comment #1; __imag__ is an
lvalue-yielding operator.  If, for some reason, we wanted to make __imag__
yield an rvalue, then this code would be rejected with an error; under no
circumstances should it yield a warning about the complex value being
uninitialized upon initialization of its imaginary component.  It would be
reasonable to warn about a subsequent use of the complex value, as the real
part remains uninitialized.

Andrew's comments about the fact that __complex__ is a scalar are irrelevant.


-- 


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


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