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

--- Comment #6 from Paul Pluzhnikov <ppluzhnikov at google dot com> 2012-05-07 
16:28:56 UTC ---
(In reply to comment #5)

> 1) to keep the current G++ semantics of compound literals, but change its
> behavior due to the implementation change (with clobber marker); 

I would argue that 1 is completely useless for "you can also construct an
array" use case from http://gcc.gnu.org/onlinedocs/gcc/Compound-Literals.html

It always initializes the pointer with dangling storage, and is always a bug.

If "keep the current g++ semantics", then the code should be rejected at
compile time, and should *not* work when built without optimization.

IMO, having this code working in C and not working in C++ is a lousy choice.

Reply via email to