[Development] clang and auto-setting of QT_NO_EXCEPTIONS
Thiago Macieira
thiago.macieira at intel.com
Thu May 25 17:22:51 CEST 2017
On Thursday, 25 May 2017 05:34:59 PDT 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?
It's a bug in your testing, because it sets QT_NO_EXCEPTIONS here with Clang.
$ clang -std=c++14 -fno-exceptions -I. -include QtCore/qglobal.h -fPIC -xc++ -
c -o /dev/null - <<<'
#ifndef QT_NO_EXCEPTIONS
# error Was not defined
#endif'
[nothing]
> Curiously this doesn't always lead to errors in template classes that use
> QT_TRY, QT_THROW etc. in code built with -fno-exceptions, I wonder how that
> can be explained.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
More information about the Development
mailing list