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

qglobal.h fails to auto-define QT_NO_EXCEPTIONS with clang

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Done
    • Affects Version/s: 5.8.0, 5.9.0 RC
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      any using clang++
    • Commits:
      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

        For Gerrit Dashboard: QTBUG-61034
        # Subject Branch Project Status CR V

          Activity

            People

            Assignee:
            rjvbertin René Bertin
            Reporter:
            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