https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96842
Bug ID: 96842 Summary: enhancement: copy clang Wheader-guard Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: dcb314 at hotmail dot com Target Milestone: --- clang checks header guard macros and gcc doesn't. So code in <stdio.h> like #ifndef _STDIO_H #define _STDIO_H_ 1 where the define is different to the previous test, gets caught. For example: AIPlayerFactory.h:19:2: warning: 'AMEOBAX_AI_PLAYER_FACTORY_H' is used as a header guard here, followed by #define of a different macro [-Wheader-guard] There are about 500 examples of this in Fedora Linux distribution.