Message158811
> 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 |
|
Date |
User |
Action |
Args |
2012-04-20 09:54:11 | mark.dickinson | set | recipients:
+ mark.dickinson, rhettinger, jcea, pitrou, kristjan.jonsson, michael.foord, eric.snow, serhiy.storchaka |
2012-04-20 09:54:11 | mark.dickinson | set | messageid: <1334915651.72.0.0285150596761.issue14381@psf.upfronthosting.co.za> |
2012-04-20 09:54:11 | mark.dickinson | link | issue14381 messages |
2012-04-20 09:54:11 | mark.dickinson | create | |
|