https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79701
Bug ID: 79701 Summary: #pragma ignored "-Wcomment" has no effect Product: gcc Version: 6.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: preprocessor Assignee: unassigned at gcc dot gnu.org Reporter: damien at iwi dot me Target Milestone: --- Hi, It seems that `diagnostic ignored -Wcomment` has no effect. Since nothing states that it does not work, I would expect no warning here. Thanks :) ``` int main() { #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wcomment" /* /* */ #pragma GCC diagnostic pop return 0; } gcc -Wall /tmp/foo.cpp /tmp/foo.cpp:5:5: warning: "/*" within comment [-Wcomment] ```