shafik wrote:

> > It feels a bit wonky that this is only an error on assignment. The gcc docs 
> > are not particularly informative here: 
> > https://gcc.gnu.org/onlinedocs/gcc/Complex.html
> > I think I would have liked to see a diagnostic saying "hey you are using 
> > **imag** with a non complex type"
> 
> I guess you mean something like "__imag operator with non-complex type is not 
> assignable" because it's only invalid as an lvalue but valid as an rvalue 
> that will return zero
> 
> https://godbolt.org/z/nnKh4c3YY

Something like that, I asked b/c I noticed EDG does diagnose: 
https://godbolt.org/z/7KhchGojW

https://github.com/llvm/llvm-project/pull/218270
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to