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

mis-configuration of c++ features when using Intel compiler on Windows with VS2012

    XMLWordPrintable

Details

    • cf3a639f9d7f6325f3d0606b7f90cbc3c4450d96

    Description

      when using the Intel compiler with Visual Studio 2012 the checks in qcompilerdetection.h are wrong for some of the c++11 features.

      initializer_list is not included with Visual Studio 2012

      qcompilerdetection.h has for the intel compiler:

      #    if __INTEL_COMPILER >= 1300
      #      define Q_COMPILER_ATOMICS
      //       constexpr support is only partial
      //#      define Q_COMPILER_CONSTEXPR
      #      define Q_COMPILER_INITIALIZER_LISTS
      #      define Q_COMPILER_UNIFORM_INIT
      #      define Q_COMPILER_NOEXCEPT
      #    endif
      

      the check needs to take into account what Visual Studio is being used with Intel

      the Intel compiler error:

      platform/ntamd64/Components/ExternalLibraries/Qt/5.5.0/include/QtCore/qflags.h(43): catastrophic error: cannot open source file "initializer_list"
        #include <initializer_list>
                                   ^
      compilation aborted for TdrawProcess.cpp (code 4)
      

      when using the Intel compiler, it doesn't have include files of it's own it uses those of the associated Visual Studio installation. The defines from the compiler dry run shows that Intel is version 1500, but at the same time Microsoft _MSC_VER is 1700 which would mean that Q_COMPILER_INITIALIZER_LISTS should not be defined, but it is

      d:\branch\main\qt5>icl -c -dryrun a.cpp
      Intel(R) C++ Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 15.0.4.221 Build 20150407
      Copyright (C) 1985-2015 Intel Corporation.  All rights reserved.
      icl: command line warning #10006: ignoring unknown option '/dryrun'
      
      echo a.cpp
      c:\PROGRA~2\Intel\CO8318~1\bin\intel64\mcpcom  \
          -_ms \
          -D__ICL=1500 \
          -D__INTEL_COMPILER=1500 \
          -D__INTEL_COMPILER_UPDATE=3 \
          -D_WIN32 \
          -D__w64= \
          -D_M_AMD64 \
          -D_M_X64 \
          -D_WIN64 \
          -D_MSC_VER=1700 \
          -D_MSC_FULL_VER=170061030 \
          -D_MSC_EXTENSIONS \
          -D_MT \
          -D__INTEL_COMPILER_BUILD_DATE=20150407 \
      

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            warnold Wayne Arnold
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes