Skip to content

#pragma GCC diagnostic is reported as an unrecognized GCC pragma #182

Description

@mborland

With GCC these pragmas should be recognized

Reproducer:

//options_all:--gnu_version=150000 --diag_error=unrecognized_gcc_pragma
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"
int f(int unused) { return 0; }
#pragma GCC diagnostic pop

Actual: warning #1675-D: unrecognized GCC pragma for each pragma.

Expected: Accepted silently. GCC 11, 12, 14, and 15 are silent with
-Wall -Wextra.

Does not affect boost compilation but leads to a huge number of instances in the build log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions