gcc-patches@gcc.gnu.org
[Top] [All Lists]

Re: [PATCH][RFC] Don't warn for alias-set-0 cast to incomplete struct

Subject: Re: [PATCH][RFC] Don't warn for alias-set-0 cast to incomplete struct
From: Richard Guenther
Date: Mon, 14 Nov 2005 16:56:27 +0100 CET
On Mon, 14 Nov 2005, Joseph S. Myers wrote:

> On Mon, 14 Nov 2005, Richard Guenther wrote:
> 
> > This patch disables the 'type-punning to incomplete type might break 
> > strict-aliasing rules' in case of the pointer target being in alias set
> > zero.  Of course one may argue this warning is bogous anyway, as one
> > can't dereference the pointer, just like void*
> 
> You do realise that the aliasing rules are asymmetrical: you can use char 
> to access an object of any effective type, but you can't use any type to 
> access an object of effective type char?  (Not an objection to this 
> patch.)

Yes I do.

Richard.

<Prev in Thread] Current Thread [Next in Thread>