public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Sergei Organov <osv@javad.com>
To: gcc-help@gcc.gnu.org
Subject: Re: Yet another aliasing question.
Date: Sat, 23 Dec 2006 12:24:00 -0000	[thread overview]
Message-ID: <emj75d$iqk$1@sea.gmane.org> (raw)
In-Reply-To: <17805.5062.252141.386087@zebedee.pink>

Andrew Haley <aph@redhat.com> writes:

> Sergei Organov writes:
>
>  > I'm trying to understand the implications of strict aliasing rules on
>  > programming practices. I've got two example functions foo() and boo()
>  > that I think both are valid from the POV of strict aliasing
>  > rules.
>
> It's hard to discuss this without looking at the standard.  Can you
> please quote the exact language in the standard thta justfies your
> opinion?

Yes, sure:

  An object shall have its stored value accessed only by an lvalue
  expression that has one of the following types:

  - a type compatible with the effective type of the object,
  [...]
  - an aggregate or union type that includes one of the aforementioned
    types among its members (including, recursively, a member of a
    subaggregate or contained union)


-- Sergei.

      reply	other threads:[~2006-12-23 12:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-23 10:45 Sergei Organov
2006-12-23 11:32 ` Andrew Haley
2006-12-23 12:24   ` Sergei Organov [this message]

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='emj75d$iqk$1@sea.gmane.org' \
    --to=osv@javad.com \
    --cc=gcc-help@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).