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

incompatible with gcc-4.3 --std=gnu++0x (partial stdc++11 support)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Done
    • Affects Version/s: 4.8.4, 5.0.0
    • Fix Version/s: 4.8.5, 5.0.2
    • Component/s: Core: Threads
    • Labels:
      None
    • Commits:
      0c4f6c6ea9415bcc5fde3e34bf909f43a9c6483c 58355a22d424ae079dea9899bb127426724ca370

      Description

      The qtconcurrentrun.h wants to optimize when stdc++11 features
      are available but the ifdef is only guarded by Q_COMPILER_DECLTYPE.

      That Q_COMPILER_DECLTYPE is defined in qglobals.h if gcc >= 4.3
      but the qtconcurrentrun.h source text does also use the new
      function decleration syntax ("foo() -> result") which is only
      available if gcc >= 4.4.

      Therefore, enabling stdc++11 support on gcc-4.3 will make any
      Qt program to fail immediately. Tested on current SLES 11 SP2.

      > make good
      { echo "#include <QtCore>" ; echo "int main() {}"; } > good.cpp
      /usr/bin/gcc-4.3 -I/usr/include/Qt good.cpp -c -o good.o

      > make fail
      { echo "#include <QtCore>" ; echo "int main() {}"; } > fail.cpp
      /usr/bin/gcc-4.3 -I/usr/include/Qt -std=gnu++0x fail.cpp -c -o fail.o

      In file included from /usr/include/Qt/QtCore:62,
      from fail.cpp:1:
      /usr/include/Qt/qtconcurrentrun.h:105: error: expected initializer before ‘->’ token
      /usr/include/Qt/qtconcurrentrun.h:113: error: expected initializer before ‘->’ token
      /usr/include/Qt/qtconcurrentrun.h:121: error: expected initializer before ‘->’ token
      /usr/include/Qt/qtconcurrentrun.h:129: error: expected initializer before ‘->’ token
      /usr/include/Qt/qtconcurrentrun.h:137: error: expected initializer before ‘->’ token
      /usr/include/Qt/qtconcurrentrun.h:145: error: expected initializer before ‘->’ token
      make: *** [fail] Fehler 1

      > cat /etc/issue

      Welcome to SUSE Linux Enterprise Server 11 SP2 (x86_64) - Kernel \r (\l).

      > rpm -q --whatprovides /usr/include/Qt/qtconcurrentrun.h
      libqt4-devel-4.8.4-284.1

      > rpm -q --whatprovides /usr/bin/gcc
      gcc-4.3-62.198

        Attachments

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

          Activity

            People

            Assignee:
            thiago Thiago Macieira
            Reporter:
            guido.draheim.2013 Guido Draheim
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes