https://bugs.llvm.org/show_bug.cgi?id=50006
Bug ID: 50006
Summary: -Wunknown-warning-option cannot be disabled via pragma
Product: clang
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Frontend
Assignee: unassignedclangb...@nondot.org
Reporter: l...@behdad.org
CC: llvm-bugs@lists.llvm.org, neeil...@live.com,
richard-l...@metafoo.co.uk
[Broadly speaking, this is similar to
https://bugs.llvm.org/show_bug.cgi?id=25436]
In HarfBuzz we declare what warnings we want as error, as warning, and ignored,
in a C++ header file:
https://github.com/harfbuzz/harfbuzz/blob/ed2ee8a8c26dc39e39172c169d8a0d434083fefe/src/hb.hh#L37-L138
clang (tested with Apple clang 12) warns about unknown warning options:
warning: unknown warning option '-Wunsafe-loop-optimizations'
[-Wunknown-warning-option]
warning: unknown warning option '-Wlogical-op'; did you mean '-Wlong-long'?
[-Wunknown-warning-option]
However, we have this before adding other warning options:
#pragma GCC diagnostic ignored "-Wunknown-warning-option"
But clang seems to ignore it. Making that line say "clang" instead of "GCC"
doesn't make any difference.
If I pass -Wno-unknown-warning-option on the commandline it works. As pragma
doesn't.
Am I doing this wrong? Thanks.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs