--- Comment #4 from pluto at agmk dot net 2006-05-05 15:10 ---
(In reply to comment #3)
You cannot. Though you can try extending c-common.c:strict_aliasing_warning
and
cp/typeck.c:build_reinterpret_cast_1 to warn in this case.
sorry, but i don't know compiler internals to do this.
--- Comment #1 from rguenth at gcc dot gnu dot org 2006-05-04 11:58 ---
This missed diagnostic is known, as enabling a warning here would cause too
much false positives. But yes, you are violating strict-aliasing rules here.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27417
--- Comment #2 from pluto at agmk dot net 2006-05-04 12:08 ---
(In reply to comment #1)
This missed diagnostic is known, as enabling a warning here would cause too
much false positives.
but what about -Wstrict-aliasing=2?
it doesn't report anything, so how can i check possible
--- Comment #3 from rguenth at gcc dot gnu dot org 2006-05-04 14:00 ---
You cannot. Though you can try extending c-common.c:strict_aliasing_warning
and
cp/typeck.c:build_reinterpret_cast_1 to warn in this case.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27417