[Development] clang and auto-setting of QT_NO_EXCEPTIONS

René J. V. Bertin rjvbertin at gmail.com
Thu May 25 21:14:09 CEST 2017


Thiago Macieira wrote:

> It's a bug in your testing, because it sets QT_NO_EXCEPTIONS here with Clang.

No it's not, ditto for testing by others. In fact, your test is wrong because it 
misses a detail: this concerns ObjC++.

See http://releases.llvm.org/3.6.0/tools/clang/docs/ReleaseNotes.html#the-exceptions-macro :

It explains rather unambiguously that clang 3.6 and later set _EXCEPTIONS `if 
C++ or ObjC exceptions are enabled` and that `To reliably test if C++ exceptions 
are enabled, use _EXCEPTIONS && __has_feature(cxx_exceptions), else things won’t 
work in all versions of Clang in Objective-C++ files.`

R




More information about the Development mailing list