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

MSVC 2019 raises Warning C4619 about C4345 in QVector when compiling with /W4

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Done
    • Affects Version/s: 5.15.2
    • Fix Version/s: None
    • Component/s: Build System
    • Labels:
      None
    • Environment:
      Microsoft Visual Studio 2019, 16.7.4
    • Platform/s:
      Windows
    • Commits:
      254b3ef97a01b9a2b5ccdd27a9e9a3d359244a02 (qt/qtbase/5.15)

      Description

      When including any header that transitively includes <QVector>, a C4619 warning is raised:

      D:\ext\Qt\5.12.2\msvc2017_64\include\QtCore\qvector.h(319,12): warning C4619: #pragma warning: there is no warning number '4345' (compiling source file XXX)

      The offending line is
      ```
      #ifdef Q_CC_MSVC
      // behavior change: an object of POD type constructed with an initializer of the form ()
      // will be default-initialized

      1. pragma warning ( push )
      2. pragma warning ( disable : 4345 )
      3. pragma warning(disable : 4127) // conditional expression is constant
        #endif
        ```
         
        Warning 4345 does not exist anymore: https://social.msdn.microsoft.com/Forums/en-US/2a7e65d6-b6fa-4963-b969-8a8d5d5190e8/what-happened-to-warning-c4345-quotbehavior-change-an-object-of-pod-type-constructed-with-an?forum=vclanguage

       

        Attachments

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

          Activity

            People

            Assignee:
            qtbuildsystem Qt Build System Team
            Reporter:
            alexander_bokc A B
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes