[Bug tree-optimization/35200] [4.3 Regression] bogus aliasing warning
hjl dot tools at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Feb 14 20:55:00 GMT 2008
------- Comment #6 from hjl dot tools at gmail dot com 2008-02-14 20:54 -------
(In reply to comment #5)
> Can you when you debug the function, please dump the VOPs also since then it
> should become obvious the issue.
>
> Anyways I don't think this an bogus warning and really I think this is a code
> issue.
>
> This is actually documented this way in fact unions cannot be used this way.
>
> That is you cannot do:
>
> float f(int a)
> {
> union {
> int i[1];
> float f[1];
> } g;
>
> int *d = g.i;
> float *f = g.f;
> *d = a;
> return *f;
> }
>
> -- Pinski
>
Where is this documented in ISO C?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35200
More information about the Gcc-bugs
mailing list