public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jbeulich at novell dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/57725] conflicting language extensions
Date: Fri, 28 Jun 2013 06:50:00 -0000	[thread overview]
Message-ID: <bug-57725-4-kbxrui8L6J@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-57725-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #9 from jbeulich at novell dot com ---
But that's the point - the compiler takes the liberty to treat "start != end"
as always true, and "start < end" as being replaceable with "start <= end".
Hence a respective for() loop could in the first case become endless, and in
the second case be run through once when the body shouldn't be entered at all.
This is what triggered all this, and I just tried to avoid referring to a
linker script when a C example alone can demonstrate this.

I agree to you saying

> It's intrinsic to using empty objects that it *doesn't matter to your 
> code* when odd things happen about objects at the same address.  If it 
> matters whether addresses derived from different objects compare distinct 
> (including whether it's determinate whether they compare distinct), don't 
> use empty objects.

but you need to carefully distinguish this from the case where the objects just
_may_ be empty, and hence the code relies on being able to detect the
emptiness.


  parent reply	other threads:[~2013-06-28  6:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-26 11:52 [Bug c/57725] New: " jbeulich at novell dot com
2013-06-26 11:53 ` [Bug c/57725] " jbeulich at novell dot com
2013-06-26 11:54 ` jbeulich at novell dot com
2013-06-26 11:54 ` jbeulich at novell dot com
2013-06-26 20:53 ` joseph at codesourcery dot com
2013-06-27 15:31 ` joseph at codesourcery dot com
2013-06-27 15:49 ` jbeulich at novell dot com
2013-06-27 17:04 ` joseph at codesourcery dot com
2013-06-28  6:50 ` jbeulich at novell dot com [this message]
2013-06-28  7:19 ` jakub at gcc dot gnu.org
2013-06-28 13:12 ` matz at gcc dot gnu.org

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=bug-57725-4-kbxrui8L6J@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).