This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Type based aliasing
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: gcc at gcc dot gnu dot org
- Date: Wed, 02 Oct 2002 22:24:40 +0100
- Subject: Type based aliasing
- Organization: Codesourcery LLC
Hi,
Do C's type based aliasing rules mean the following?
void foo (int *ip, float *fp)
{
if (ip == fp)
this_is_unreachable ()
}
I vaguely remember some discussion about this, but can't remember the
conclusion. Presumably IP & FP could point to members of the same union.
(f77 has code like the above, where the condition may or may not be false.)
nathan
--
Dr Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org