https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119050
Bug ID: 119050 Summary: libstdc++ headers are not `-Wsystem-headers -Wundef ` friendly Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: pinskia at gcc dot gnu.org Target Milestone: --- Created attachment 60605 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=60605&action=edit warnings with -Wundef A simple: ``` #include <iostream> ``` Causes the attached warnings when used with `-Wsystem-headers -Wundef `. I am not 100% sure with -Wundef should ever be used with C++ because the recommended way to using the C++ feature macros is just use them (without testing if they are defined) and comparing with a specific date. So I don't mind if this will be closed as won't fix either. Or maybe -Wundef can be refinded not to warn about the C++ feature macros ...