public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: aoliva@gcc.gnu.org
To: nobody@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org
Subject: Re: c++/1833
Date: Sun, 01 Apr 2001 00:00:00 -0000	[thread overview]
Message-ID: <20010302103601.25213.qmail@sourceware.cygnus.com> (raw)

The following reply was made to PR c++/1833; it has been noted by GNATS.

From: aoliva@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org, nobody@gcc.gnu.org, peteb@sitera.com
Cc:  
Subject: Re: c++/1833
Date: 2 Mar 2001 10:26:28 -0000

 Synopsis: inlining sometimes causes incorrect behavior
 
 State-Changed-From-To: open->analyzed
 State-Changed-By: aoliva
 State-Changed-When: Fri Mar  2 02:26:28 2001
 State-Changed-Why:
     There is indeed a bug.  The problem is that the result of the cast is an rvalue, because the cast-to type is not a reference type.  Therefore, a temporary should be created.  However, a temporary cannot be bound to a non-const reference, but g++ happily binds it to frob2's argument, even with -ansi -pedantic.
     Even if the binding-to-non-const were to be done as an extension, it still shouldn't modify variable s; it should modify the temporary, then discard it.
     WRT the difference between the inline and the non-inline functions, the problem is likely to be in the tree level, because the initial RTL dump is already significantly different for the two functions.
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=1833&database=gcc


             reply	other threads:[~2001-04-01  0:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-01  0:00 aoliva [this message]
2003-04-03 17:36 c++/1833 Wolfgang Bangerth
2003-04-04  3:06 c++/1833 Nigel Stewart
2003-05-08 23:46 c++/1833 Wolfgang Bangerth
2003-05-09  7:16 c++/1833 Gabriel Dos Reis

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=20010302103601.25213.qmail@sourceware.cygnus.com \
    --to=aoliva@gcc.gnu.org \
    --cc=gcc-prs@gcc.gnu.org \
    --cc=nobody@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: link
Be 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).