https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61371
--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> --- (In reply to Cristian Rodríguez from comment #6) > (In reply to Manuel López-Ibáñez from comment #5) > > (In reply to Cristian Rodríguez from comment #2) > > > It would be.. if there wasn't half a ton of packages using -Werror > > > > In fact, it was committed and the message tells you which option you have to > > use to silence the warning: > > > > manuel@gcc10:~$ ~/test1/210581/build/gcc/cc1 -D__DATE__='bla' test.c -Werror > > <command-line>:0:0: error: "__DATE__" redefined > > [-Werror=builtin-macro-redefined] > > > > manuel@gcc10:~$ ~/test1/210581/build/gcc/cc1 -D__DATE__='bla' test.c -Werror > > -Wno-error=builtin-macro-redefined > > <command-line>:0:0: warning: "__DATE__" redefined > > [-Wbuiltin-macro-redefined] > > > > manuel@gcc10:~$ ~/test1/210581/build/gcc/cc1 -D__DATE__='bla' test.c -Werror > > -Wno-builtin-macro-redefined > > > > > > Isn't this what you want? > > -Wno-builtin-macro-redefined silences redefinitions of __FILE__, and > __BASE_FILE__.. So? You might be happier with -Wno-error=builtin-macro-redefined (if that works). Of course warnings for redefinition of DATE/TIME etc. prevail then.