------- Comment #8 from jason at gcc dot gnu dot org  2009-06-10 19:37 -------
As Jakub says, it's not a problem to take the address of a local variable as
long as that address is only used during the variable's lifetime; the
destructor for the temporary removes all references to its address, so there's
nothing undefined.

The problem here seems to be that the address of the object escapes during its
own construction.  I guess we need a type flag to indicate this situation so we
can mark variables of such a type addressable when we create them.


-- 

jason at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jason at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2009-06-09 17:11:13         |2009-06-10 19:37:07
               date|                            |


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

Reply via email to