public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Dale Johannesen <dalej@apple.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: Dale Johannesen <dalej@apple.com>,
	Aldy Hernandez <aldyh@redhat.com>,
	gcc@gcc.gnu.org
Subject: Re: subreg question
Date: Thu, 13 Dec 2001 13:04:00 -0000	[thread overview]
Message-ID: <EEBA8D7B-F00C-11D5-86F6-003065C86F94@apple.com> (raw)
In-Reply-To: <20011213154352.A31306@nevyn.them.org>


On Thursday, December 13, 2001, at 12:43 PM, Daniel Jacobowitz wrote:
>>>>
>>>> I don't see why not.  (C89) 3.3.4 says the cast might produce an 
>>>> invalid
>>>> pointer if it's not aligned properly, which is not the case here.
>>>> Other than that I don't find any relevant restriction in the standard.
>>>> What did you have in mind?
>>>> (FWIW, gcc doesn't warn about this even with -pedantic.)
>>>
>>> It's not an invalid pointer.  It doesn't alias with Z, though.
>>
>> Why not?
>
> The C standard's aliasing rules.  *((float *)&z) is an object of type
> float; double is a different type than float; z is an object of type
> double; *((float *)&z) and z can not alias.

Can you point me to someplace in the standard that says this?

  reply	other threads:[~2001-12-13 21:04 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-12 18:13 Dale Johannesen
2001-12-13  1:39 ` Jan Hubicka
2001-12-13 10:33 ` Aldy Hernandez
2001-12-13 12:26   ` Dale Johannesen
2001-12-13 12:39     ` Daniel Jacobowitz
2001-12-13 12:45       ` Dale Johannesen
2001-12-13 12:51         ` Daniel Jacobowitz
2001-12-13 13:04           ` Dale Johannesen [this message]
2001-12-13 13:33             ` Daniel Jacobowitz
2001-12-13 13:34             ` Aldy Hernandez
2001-12-13 14:56               ` Richard Henderson
2001-12-13 13:04           ` Aldy Hernandez
2001-12-13 14:57             ` Joe Buck
2008-03-25 14:56 Jan Hoogerbrugge
2008-03-25 15:58 ` Paul Brook

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=EEBA8D7B-F00C-11D5-86F6-003065C86F94@apple.com \
    --to=dalej@apple.com \
    --cc=aldyh@redhat.com \
    --cc=drow@mvista.com \
    --cc=gcc@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).