https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91046
Eric Gallager <egallager at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |egallager at gcc dot gnu.org --- Comment #1 from Eric Gallager <egallager at gcc dot gnu.org> --- gcc warns for me: $ echo "" >> empty.c $ /usr/local/bin/gcc -c -Wall -Wextra -pedantic empty.c empty.c:1: warning: ISO C forbids an empty translation unit [-Wpedantic] 1 | | $ For comparison, clang puts this under its own separate flag: $ clang -c -Wall -Wextra -pedantic empty.c empty.c:1:1: warning: ISO C requires a translation unit to contain at least one declaration [-Wempty-translation-unit] ^ 1 warning generated. $ So maybe it's worth splitting -Wempty-translation-unit off from -Wpedantic in gcc too, so it's separately controllable?