public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: jason@gcc.gnu.org To: andrewp@andypo.net, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, gdr@gcc.gnu.org, jason@gcc.gnu.org Subject: Re: c++/3230: False warning for 'returning reference to temporary' Date: Mon, 18 Mar 2002 06:02:00 -0000 [thread overview] Message-ID: <20020318140221.32532.qmail@sources.redhat.com> (raw) Synopsis: False warning for 'returning reference to temporary' Responsible-Changed-From-To: gdr->jason Responsible-Changed-By: jason Responsible-Changed-When: Mon Mar 18 06:02:19 2002 Responsible-Changed-Why: mine State-Changed-From-To: analyzed->closed State-Changed-By: jason State-Changed-When: Mon Mar 18 06:02:19 2002 State-Changed-Why: This is not a bug in the compiler. The standard (5.16) says that the result of your ?: expression is an rvalue, because the two options do not have the same type. As a result, the return value binds to that rvalue, which is a local temporary. The EDG compiler gives the same warning. You may feel that this is a bug in the standard, and I'd be inclined to agree. But until the standard is fixed, the compiler will continue to work this way. If you'd like to submit a defect report against the standard, the place for that is comp.std.c++. http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=3230
next reply other threads:[~2002-03-18 14:02 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-03-18 6:02 jason [this message] -- strict thread matches above, loose matches on Subject: below -- 2002-03-21 0:26 Gabriel Dos Reis 2001-08-11 13:19 gdr 2001-06-18 9:26 andrewp
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20020318140221.32532.qmail@sources.redhat.com \ --to=jason@gcc.gnu.org \ --cc=andrewp@andypo.net \ --cc=gcc-bugs@gcc.gnu.org \ --cc=gcc-gnats@gcc.gnu.org \ --cc=gcc-prs@gcc.gnu.org \ --cc=gdr@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).