https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94264

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at gcc dot gnu.org
           Assignee|unassigned at gcc dot gnu.org      |jason at gcc dot gnu.org
         Depends on|                            |53220
             Status|NEW                         |ASSIGNED

--- Comment #7 from Jason Merrill <jason at gcc dot gnu.org> ---
This is due to my PR53220 change to discourage use of compound-literals in ways
that produce a dangling pointer when the C++ compiler treats them as prvalues,
unlike C where they have variable lifetime.

I think the change was always wrong, but wasn't really a problem until we added
array prvalues in C++17.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53220
[Bug 53220] [4.7/4.8 Regression] g++ mis-compiles compound literals

Reply via email to