https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103180
Bug ID: 103180 Summary: casting char * to any type did not report the warning message Product: gcc Version: 9.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: jie....@compiler-dev.com Target Milestone: --- When using gcc-9.3.0 to compile the test case with -fstrict-aliasing -Wstrict-aliasing=1,gcc did not report the strict aliasing violation warning message. The test case is as follows: char aa[100]; int *ptr; int main() { ptr = (int *) aa; return ptr[0]; }