This is the mail archive of the 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 #29 from pinskia at gcc dot gnu dot org  2005-11-16 18:54 -------
(In reply to comment #27)
> From libstdc++ perspective, __imag__ ought to be an lvalue. This is a recurent
> issue for C++ complex<>. 

Of course the lvalue is moot, I never said __imag__ should not be lvalue, I
don't know where Mark gets that from (maybe it is because I was showing why the
warning is correct or something I don't know).

>From the C perspective the warning is correct as you are loading piece wise
which is not really supported at all, even shown by my integer testcase.

As I said before __imag__ a should be an lvalue but __imag__ a = b is
equivalent to a = COMPLEX < REAL<a>, b> there is nothing from any point of view
doing it this way.

Also I should note that __imag__ being around is an extension, a not so well
documented one at that.  So changing this to behavior this way is well defined.
 And if you look and you will see that now we actually perform a lot more
optimizations on complex unlike before when we split it up.  (this is also in
reference to RTH's comments in comment #24).


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