[Bug preprocessor/100125] -Wunused-macros generated while should be ignored; if undef is seen?

lhyatt at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jun 29 16:08:16 GMT 2022


Lewis Hyatt <lhyatt at gcc dot gnu.org> changed:

           What    |Removed                     |Added
                 CC|                            |lhyatt at gcc dot gnu.org
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #1 from Lewis Hyatt <lhyatt at gcc dot gnu.org> ---
The reason it works without #undef is that cpp_finish() is called late by the
C++ frontend, after it has processed everything including pragmas. With #undef,
the warning is generated immediately by libcpp and so is subject to PR53431.
There is a patch waiting for review that will resolve it.

*** This bug has been marked as a duplicate of bug 53431 ***

More information about the Gcc-bugs mailing list