Message158811
| Author |
mark.dickinson |
| Recipients |
eric.snow, jcea, kristjan.jonsson, mark.dickinson, michael.foord, pitrou, rhettinger, serhiy.storchaka |
| Date |
2012年04月20日.09:54:11 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1334915651.72.0.0285150596761.issue14381@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
> I declare that this rule does not apply here ...
Clearly the gcc developers disagree. :-)
iwasawa:~ mdickinson$ cat test2.c
int is_positive_zero(double f) {
return *(long long*)&f == 0;
}
iwasawa:~ mdickinson$ gcc -fstrict-aliasing -O3 -Wall -Wextra -Wstrict-aliasing -c test2.c
test2.c: In function ‘is_positive_zero’:
test2.c:2: warning: dereferencing type-punned pointer will break strict-aliasing rules |
|