https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97989
--- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Because without the -dD implicitly added for -g3 the -g3 option can't work as documented, in particular record the macros in the debug information. Because they would be irrecoverably lost during the preprocessing phase.