RTTI is enabled in clang by default |
|
Issue description
$ cat rtti.cpp
#include <iostream>
int main() {
#if !(__has_feature(cxx_rtti))
std::cout << " NO RTTI " <<std::endl;
#else
std::cout << " HAS RTTI " <<std::endl;
#endif
}
$ clang++ rtti.cpp -o rtti
$ ./rtti
HAS RTTI
RTTI can be disabled by passing -fno-rtti.
$ clang++ rtti.cpp -o rtti -fno-rtti
$ ./rtti
NO RTTI
This was discovered when libc++ was enabled as the default c++ library.
|
|
►
Sign in to add a comment |
|
Comment 1 by manojgupta@chromium.org
, Aug 9 2017