This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][RFC] Don't warn for alias-set-0 cast to incomplete struct
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.)
I guess this was not a patch approval? ;)
Richard.