public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: Randy Fields <randy@fieldshome.com>
To: nobody@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org,
Subject: Re: c/9266: decrement pointer side effects are not working properly
Date: Fri, 10 Jan 2003 22:06:00 -0000	[thread overview]
Message-ID: <20030110220601.31085.qmail@sources.redhat.com> (raw)

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

>From randy@fieldshome.com  Mon Jan 13 00:52:34 2003
From: Randy Fields <randy@fieldshome.com>
To: bangerth@dealii.org,  gcc-bugs@gcc.gnu.org,  gcc-prs@gcc.gnu.org, 
 nobody@gcc.gnu.org,  randy@fieldshome.com,  gcc-gnats@gcc.gnu.org
Cc:  
Subject: Re: c/9266: decrement pointer side effects are not working properly
Date: Fri, 10 Jan 2003 14:57:53 -0700

 Greetings, and thank you for your quick response.  I see that depending 
 on the side effects of these types of statements (pointer decrement) is 
 not a good habit to be in, and will promptly change my own code so that 
 it works.  However, this same code base has been running (and compiling) 
 across many different platforms and compilers (MS VC++ 4,5,6,7, IRIX, 
 earlier versions of gcc) for six years.  This is the first time we have 
 encountered the problem.  I'm not saying that what the other compilers 
 are doing is correct, only that someone there may want to look more 
 closely at it for compatability sake.  I see several bugs on the list 
 that could potentially be caused by this very problem.  I'll be glad to 
 provide assembler code dumps, or any assistence that I can, if needed.
 
 Thanks,
 Randy Fields
 Artis LLC
 Research Programmer
 
 bangerth@dealii.org wrote:
 
 >Synopsis: decrement pointer side effects are not working properly
 >
 >State-Changed-From-To: open->closed
 >State-Changed-By: bangerth
 >State-Changed-When: Fri Jan 10 13:28:13 2003
 >State-Changed-Why:
 >    You're changing the same variable twice in the same statement,
 >    and the result depends on the order in which this happens.
 >    This invokes undefined behavior -- don't do this.
 >    
 >    W.
 >
 >http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9266
 >
 >
 >  
 >
 
 
 


             reply	other threads:[~2003-01-10 22:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-10 22:06 Randy Fields [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-01-10 22:46 Neil Booth
2003-01-10 21:28 bangerth
2003-01-10 21:16 randy

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=20030110220601.31085.qmail@sources.redhat.com \
    --to=randy@fieldshome.com \
    --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).