public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/52202] New: [C++11][DR 1376] Should not extend lifetime of temporary wrapped in static_cast to reference type
@ 2012-02-10 21:29 jason at gcc dot gnu.org
  2021-04-06  7:07 ` [Bug c++/52202] " jens.maurer at gmx dot net
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: jason at gcc dot gnu.org @ 2012-02-10 21:29 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 52202
           Summary: [C++11][DR 1376] Should not extend lifetime of
                    temporary wrapped in static_cast to reference type
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jason@gcc.gnu.org


// Core 1376                                                                    
// { dg-options -std=c++0x }                                                    

extern "C" void abort();
bool x;
struct T { ~T() { if (x) abort (); } };
int main()
{
  T&& r = static_cast<T&&>(T());
  x = true;
}


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-04-07  2:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-10 21:29 [Bug c++/52202] New: [C++11][DR 1376] Should not extend lifetime of temporary wrapped in static_cast to reference type jason at gcc dot gnu.org
2021-04-06  7:07 ` [Bug c++/52202] " jens.maurer at gmx dot net
2021-04-07  2:12 ` mpolacek at gcc dot gnu.org
2021-04-07  2:19 ` cvs-commit at gcc dot gnu.org
2021-04-07  2:20 ` mpolacek at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).