public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: Gabriel Dos Reis <gdr@codesourcery.com> To: jason@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, Subject: Re: c++/3230: False warning for 'returning reference to temporary' Date: Thu, 21 Mar 2002 00:26:00 -0000 [thread overview] Message-ID: <20020321082601.15915.qmail@sources.redhat.com> (raw) The following reply was made to PR c++/3230; it has been noted by GNATS. From: Gabriel Dos Reis <gdr@codesourcery.com> To: jason@gcc.gnu.org Cc: andrewp@andypo.net, gcc-bugs@gcc.gnu.org, gdr@gcc.gnu.org, gcc-gnats@gcc.gnu.org Subject: Re: c++/3230: False warning for 'returning reference to temporary' Date: 21 Mar 2002 09:17:51 +0100 jason@gcc.gnu.org writes: | 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. OK. | 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. I'll raise the issue on the core group refelector. -- Gaby
next reply other threads:[~2002-03-21 8:26 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-03-21 0:26 Gabriel Dos Reis [this message] -- strict thread matches above, loose matches on Subject: below -- 2002-03-18 6:02 jason 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=20020321082601.15915.qmail@sources.redhat.com \ --to=gdr@codesourcery.com \ --cc=gcc-prs@gcc.gnu.org \ --cc=jason@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).