Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

Missing -Wpragma diagnostic #28779

Open Quuxplusone opened 8 years ago

Quuxplusone commented 8 years ago
Bugzilla Link PR28784
Status NEW
Importance P normal
Reported by Davide Italiano (ditaliano@apple.com)
Reported on 2016-07-30 17:06:21 -0700
Last modified on 2016-08-01 11:21:37 -0700
Version unspecified
Hardware PC All
CC llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also
While building with GCC 6.1:

[156/201] Building CXX object
unittests/Support/CMakeFiles/SupportTests.dir/AlignOfTest.cpp.o
../unittests/Support/AlignOfTest.cpp:38:32: warning: ‘-w’ is not an option that
controls warnings [-Wpragmas]
 #pragma GCC diagnostic warning "-w"
                                ^~~~

clang doesn't seem to warn on the same case.
Quuxplusone commented 8 years ago
Clang does warn on that case:

main.cpp:19:32: warning: pragma diagnostic expected option name (e.g. "-
Wundef") [-Wunknown-pragmas]
#pragma GCC diagnostic warning "-w"
                               ^

... but the warning flag is different. Maybe that's why you're not seeing a
diagnostic for this?