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

qstring.h: gcc signed overflow error when using -O2

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.3.0
    • 4.8.5, 5.1.1
    • SQL Support
    • None
    • gcc-4.8.2 (fedora)

    Description

      building qt-4.8.5 with gcc-4.8.2 causes the following warning

      In file included from ../../include/QtCore/qstring.h:1:0,
      from ../../include/QtCore/../../src/corelib/kernel/qobject.h:48,
      from ../../include/QtCore/qobject.h:1,
      from kernel/qsqldriver.h:45,
      from kernel/qsqldriver.cpp:42:
      ../../include/QtCore/../../src/corelib/tools/qstring.h: In member function 'virtual QString QSqlDriver::sqlStatement(QSqlDriver::StatementType, const QString&, const QSqlRecord&, bool) const':
      ../../include/QtCore/../../src/corelib/tools/qstring.h:799:11: warning: assuming signed overflow does not occur when assuming that (X - c) > X is always false [-Wstrict-overflow]
      { if (i >= s.d->size) s.expand; else s.detach();

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            than@redhat.com Than Ngo
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes