[llvm-bugs] [Bug 50006] New: -Wunknown-warning-option cannot be disabled via pragma
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Apr 16 13:10:05 PDT 2021
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: unassignedclangbugs at nondot.org
Reporter: llvm at behdad.org
CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
richard-llvm at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210416/845490a8/attachment-0001.html>
More information about the llvm-bugs
mailing list