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

qmake generates deprected C++17 name (gnu++1z)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Not Evaluated
    • None
    • 5.12.5, 5.13.2
    • Build tools: qmake
    • None
    • Tested on Arch, 5.13.2 and Fedora 31, 5.12.5. Both generate the deprecated name for C++17, but only the Fedora cross-compiler fails.
    • Linux/X11

    Description

      When specifying CONFIG += c++17 inside the Qt project file, the generated Makefile after running qmake generates -std=gnu++1z in CXXFLAGS, which according to the gcc documentation is deprecated:

      gnu++17
      gnu++1z
          GNU dialect of -std=c++17. The name gnu++1z is deprecated.
      

      This makes the build fail on some systems, like the Windows cross-compiler on Fedora 31. Manually changing it to gnu++17 works as a workaround.

      error: unrecognized command line option '-std=gnu++1Z'; did you mean '-std=gnu++11'?
      

      EDIT:
      After some debugging, I noticed the error is caused by qmake generating -std=gnu++1Z rather than -std=gnu++1z.

      Attachments

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

        Activity

          People

            qtbuildsystem Qt Build System Team
            kraxie kraxie
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes