This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] fix aliasing for chars in global structures - take II
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- To: Dan Nicolaescu <dann at godzilla dot ICS dot UCI dot EDU>
- Cc: <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 20 Mar 2002 22:18:07 +0000 (GMT)
- Subject: Re: [PATCH] fix aliasing for chars in global structures - take II
On Wed, 20 Mar 2002, Dan Nicolaescu wrote:
> It looks like the guys on comp.std.c aggree that this is optimization
> is OK.
It doesn't look like anything of the sort - there were no replies that
really addressed the question (of whether there need be any objects whose
effective type is a structure type, in the presence of operations on
pointers to such types). Nor were there any messages on the subject from
anyone I recognised as a member of the committee [1]. There was a note
that modifying a structure member can change padding (6.2.6.1#6) - but
this isn't relevant without an object of (presumably effective) structure
type present.
comp.std.c can clarify areas where the standard is obscure but there's a
consensus understanding built up. This isn't one. It's clearly DR
material; please submit one (or persuade Clive Feather to include it in a
subsequent batch of comp.std.c-derived DRs).
[1] Replies from committee members aren't authoritative anyway, just one
person's opinion. That's why you can get both "obviously yes" and
"obviously no" as answers from different committee members to the same
question.
--
Joseph S. Myers
jsm28@cam.ac.uk