languagelawyer wrote:

> That probably should continue to work -- we accept it today and so does GCC

GCC started accepting it from version 14, likely when fixing 
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94264 (it is mentioned in 
https://github.com/llvm/llvm-project/issues/54016#issuecomment-1752262953), but 
it also started accepting `IA{ 1, 2, 3 } + 0`, which is clearly wrong 
https://godbolt.org/z/r7Yc3o1qd @pinskia @jicama

I think, if someone wants 100% C compatibility, then they should make compound 
literals lvalues. If compound literals are prvalues in C++ extension, then they 
should be treated like other array prvalues

https://github.com/llvm/llvm-project/pull/140702
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to