https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89132
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |diagnostic Known to fail| |9.0 --- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> --- Clang diagnoses both problems with just -Wcast-align (and apparently always has): u.c:2:16: warning: cast from 'int *' to 'long long *' increases required alignment from 4 to 8 [-Wcast-align] long long *p = (long long*)&i; // -Wcast-align (good) ^~~~~~~~~~~~~~ u.c:5:16: warning: cast from 'void (*)(void)' to 'long long *' increases required alignment from 4 to 8 [-Wcast-align] long long *q = (long long*)f; // missing -Wcast-align ^~~~~~~~~~~~~ 2 warnings generated.