Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-61034

qglobal.h fails to auto-define QT_NO_EXCEPTIONS with clang

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • None
    • 5.8.0, 5.9.0 RC
    • None
    • any using clang++
    • d1db78e4ae48207eaeb91e2b559110a410518bd8

    Description

      qglobal.h auto-defines QT_NO_EXCEPTIONS when GCC is used with `-fno-exceptions` but fails to do so with clang.

       

      According to 

      http://releases.llvm.org/3.6.0/tools/clang/docs/ReleaseNotes.html#the-exceptions-macro this is possible with the following preprocessor contraption (which works for me):

       

      `

      defined(Q_CC_CLANG) && !(defined(__EXCEPTIONS) && __has_feature(cxx_exceptions)))`

       

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            rjvbertin René Bertin
            rjvbertin René Bertin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes