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

corelib/global/qsimd.cpp has some narrowing integral warnings

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P2: Important
    • None
    • 6.8
    • Core: Other
    • None
    • Linux/Wayland

    Description

      This is because cpuidFeatures07_00 takes uint, but uses qregisteruint internally:

       static void cpuidFeatures07_00(uint &ebx, uint &ecx, uint &edx)
      {
      #if defined(Q_CC_GNU) && !defined(Q_CC_EMSCRIPTEN)
          qregisteruint rbx; // in case it's 64-bit
          qregisteruint rcx = 0;
          qregisteruint rdx = 0;
      
      src/corelib/global/qsimd.cpp:355:11: warning: implicit conversion loses integer precision: 'qregisteruint' (aka 'unsigned long long') to 'uint' (aka 'unsigned int') [-Wshorten-64-to-32]
        355 |     ebx = rbx;
            |         ~ ^~~
      src/corelib/global/qsimd.cpp:356:11: warning: implicit conversion loses integer precision: 'qregisteruint' (aka 'unsigned long long') to 'uint' (aka 'unsigned int') [-Wshorten-64-to-32]
        356 |     ecx = rcx;
            |         ~ ^~~
      src/corelib/global/qsimd.cpp:357:11: warning: implicit conversion loses integer precision: 'qregisteruint' (aka 'unsigned long long') to 'uint' (aka 'unsigned int') [-Wshorten-64-to-32]
        357 |     edx = rdx;
            |         ~ ^~~
      

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            ahmad.samir Ahmad Samir
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes