public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Brian Dessent <brian@dessent.net>
To: gcc-help@gcc.gnu.org
Subject: Re: quick question
Date: Thu, 16 Feb 2006 15:35:00 -0000	[thread overview]
Message-ID: <43F49BA2.2E2DA581@dessent.net> (raw)
In-Reply-To: <80f4f2b20602160657g33bbf1b1g9d810a2d5c2ab65c@mail.gmail.com>

Jim Stapleton wrote:

>   char test[] =  {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
> 0x08, 0x09, 0x0a};
>   char *tptr = test;
>   int *ptr;
> 
>   ptr = (int*)tptr;

Doesn't this violate the C aliasing rules?  If so the whole thing is
undefined behavior.

Brian

  parent reply	other threads:[~2006-02-16 15:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-16 14:57 Jim Stapleton
2006-02-16 15:23 ` John Love-Jensen
2006-02-16 15:28 ` Perry Smith
     [not found]   ` <80f4f2b20602160737q5684d6c3l5df46c8a64fe47ad@mail.gmail.com>
2006-02-16 15:39     ` Jim Stapleton
2006-02-16 20:20       ` Ben Rudiak-Gould
     [not found]     ` <D94028E4-C732-4FB6-8C07-D38676404EEB@easesoftware.net>
2006-02-16 16:17       ` Jim Stapleton
2006-02-16 16:22         ` random
2006-02-16 16:37           ` Perry Smith
2006-02-16 15:35 ` Brian Dessent [this message]
2006-02-16 15:39   ` Jim Stapleton
2006-02-16 15:46     ` Brian Dessent
2006-02-16 15:56       ` Jim Stapleton
2006-02-16 15:49     ` Jim Stapleton

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=43F49BA2.2E2DA581@dessent.net \
    --to=brian@dessent.net \
    --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).