[llvm-bugs] [Bug 46230] New: clang-cl incorrectly defines __cpp_rtti when /GR- is specified
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Jun 6 23:16:02 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=46230
Bug ID: 46230
Summary: clang-cl incorrectly defines __cpp_rtti when /GR- is
specified
Product: clang
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: Driver
Assignee: unassignedclangbugs at nondot.org
Reporter: zufuliu at 163.com
CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
richard-llvm at metafoo.co.uk
// test-rtti.cpp
#ifdef __cpp_rtti
#warning __cpp_rtti defined
#endif
#ifdef _CPPRTTI
#warning _CPPRTTI defined
#endif
tested llvm 10, and 693ff89f47ffe1f357ddd3a5112cd90eb8b3e2d1
clang-cl -c /GR- test-rtti.cpp
test-rtti.cpp(2,2): warning: __cpp_rtti defined [-W#warnings]
#warning __cpp_rtti defined
^
1 warning generated.
clang-cl -c /GR test-rtti.cpp
test-rtti.cpp(2,2): warning: __cpp_rtti defined [-W#warnings]
#warning __cpp_rtti defined
^
test-rtti.cpp(5,2): warning: _CPPRTTI defined [-W#warnings]
#warning _CPPRTTI defined
^
2 warnings generated.
clang -c -frtti test-rtti.cpp
test-rtti.cpp:2:2: warning: __cpp_rtti defined [-W#warnings]
#warning __cpp_rtti defined
^
test-rtti.cpp:5:2: warning: _CPPRTTI defined [-W#warnings]
#warning _CPPRTTI defined
^
2 warnings generated.
clang -c -fno-rtti test-rtti.cpp
// expected, neither is defined.
--
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/20200607/be81911d/attachment.html>
More information about the llvm-bugs
mailing list