On Fri, 2 Dec 2022, Longjun Luo via Gcc-patches wrote: > They are ./gcc/testsuite/gcc.dg/cpp/warn-redefined.c and > ./gcc/testsuite/gcc.dg/cpp/warn-redefined-2.c > > These two cases redefine the __TIME__ macro when using the option > '-Wbuiltin-macro-redefined'. > > I think I shoud add a test to verify __LINE__ macro in these two cases.
I think it should be a test that doesn't use either -Wbuiltin-macro-redefined or -Wno-builtin-macro-redefined - a test of how the compiler behaves by default. > So, the patch itself has no problem. What I need do is to rich its test cases > and update change log, right? The patch needs review, but I'm fine with the principle that -Wno-builtin-macro-redefined should apply to __LINE__ as it does to various other built-in macros. -- Joseph S. Myers jos...@codesourcery.com