[Development] clang and auto-setting of QT_NO_EXCEPTIONS
René J. V. Bertin
rjvbertin at gmail.com
Thu May 25 15:19:56 CEST 2017
René J. V. Bertin wrote:
> Hello,
>
> Qglobal.h sets QT_NO_EXCEPTIONS automatically when building with -fno-
> exceptions, but only when a GNU compiler is used, not when using clang. Is
> that an oversight or rather because it's impossible with clang?
The answer is clearly not that it's impossible with clang. Not as
straightforward, -fno-exceptions can be detected with
defined(Q_CC_CLANG) && !(defined(__EXCEPTIONS) &&
__has_feature(cxx_exceptions)))
(found here:
http://releases.llvm.org/3.6.0/tools/clang/docs/ReleaseNotes.html#the-exceptions-macro)
I've filed a bug: https://bugreports.qt.io/browse/QTBUG-61034
R.
More information about the Development
mailing list