public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "schlie at comcast dot net" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/21402] wrong-code with inlining and type-punned pointer
Date: Sat, 21 May 2005 21:28:00 -0000 [thread overview]
Message-ID: <20050521212825.8535.qmail@sourceware.org> (raw)
In-Reply-To: <20050505153523.21402.gcc@arbruijn.dds.nl>
------- Additional Comments From schlie at comcast dot net 2005-05-21 21:28 -------
(In reply to comment #4)
> Subject: Re: wrong-code with inlining and type-punned pointer
> Because this is what the standard says is allowed. The standard also
> says the comparisons and assignment between pointers without a case is
> invalid code and should be diagnostic. Again this is what the standard
> says for these things and GCC follows the C standard.
Here's an interesting portion of the standard, which seems to direcly imply
that signed and unsigned lvalue references are presumed to validly alias; so
so this should place both in the same alias set, and potentially eliminate the
default warning when comparing pointers which differ only in signness, as
it seems a little silly if they may factually alias each other:
6.3 Expressions
[#7] An object shall have its stored value accessed only by
an lvalue expression that has one of the following types:59
- a type compatible with the effective type of the
object,
- a qualified version of a type compatible with the
effective type of the object,
- a type that is the signed or unsigned type
corresponding to the effective type of the object,
- a type that is the signed or unsigned type
corresponding to a qualified version of the effective
__________
59. The intent of this list is to specify those
circumstances in which an object may or may not be
aliased.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21402
next prev parent reply other threads:[~2005-05-21 21:28 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-05 15:35 [Bug rtl-optimization/21402] New: " gcc at arbruijn dot dds dot nl
2005-05-05 15:38 ` [Bug rtl-optimization/21402] " gcc at arbruijn dot dds dot nl
2005-05-05 16:13 ` pinskia at gcc dot gnu dot org
2005-05-05 17:20 ` schlie at comcast dot net
2005-05-05 18:41 ` Andrew Pinski
2005-05-05 18:41 ` pinskia at physics dot uc dot edu
2005-05-21 21:28 ` schlie at comcast dot net [this message]
2005-05-21 21:42 ` Gabriel Dos Reis
2005-05-21 21:42 ` gdr at integrable-solutions dot net
2005-05-21 22:28 ` schlie at comcast dot net
2005-05-21 22:32 ` Andrew Pinski
2005-05-21 22:32 ` pinskia at physics dot uc dot edu
2005-05-21 23:31 ` schlie at comcast dot net
2005-06-05 9:21 ` pinskia at gcc dot gnu dot org
2005-06-05 9:21 ` pinskia at gcc dot gnu dot 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=20050521212825.8535.qmail@sourceware.org \
--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).