I have some code which is unsafe without -fno-strict-aliasing. I'd like to clean up the code while still having it work OK. Thus, I specify both -fno-strict-aliasing and -Wstrict-aliasing=2. I'm not getting the warnings.
I think this is a general problem for warnings. The documentation for the warning options does not specify what optimization is needed to make them work, and the compiler does not reject option combinations that cause options to be useless. In any case, I simply can't enable the optimization and still get a working app. -- Summary: -Wstrict-aliasing does not enable analysis Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: acahalan at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26411