https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79346
Bug ID: 79346 Summary: -Wundef should not warn for standard macros Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: preprocessor Assignee: unassigned at gcc dot gnu.org Reporter: mpeg.blue at free dot fr CC: david at westcontrol dot com, jwakely.gcc at gmail dot com, vincent-gcc at vinc17 dot net Target Milestone: --- ML discussion: https://gcc.gnu.org/ml/gcc-help/2017-02/msg00000.html According to Jonathan, -Wundef would warn for this legitimate use-case: #if __STDC_VERSION__ < 199901L #endif Vincent suggested that there could be some kind of white-list for macros which would not trigger the warning. Macros suggested for the white-list: https://gcc.gnu.org/ml/gcc-help/2017-02/msg00009.html __STDC_VERSION__ __STDC_ISO_10646__ __STDC_MB_MIGHT_NEQ_WC__ __STDC_UTF_16__ __STDC_UTF_32__ Bug 49928 might be relevant.