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

Regression: qtbase build with native float support is broken

    XMLWordPrintable

Details

    Description

      src_corelib_serialization_qcborstream.cpp was added unconditionally in
      https://codereview.qt-project.org/c/qt/qtbase/+/662227.

      The float c'tor of qfloat16 isn't compiled with native float
      support (i.e. QFLOAT16_IS_NATIVE macro defined).
      src_corelib_serialization_qcborstream.cpp causes a compile error in that
      case, because it attempts to use the uncompiled c'tor.

      To reproduce, try to compile qtbase on openSuSE with native float support (e.g. gcc-15).

      ../../dev/qtbase/configure  -developer-build -xcb -make tests
      ninja
      
      [...]
      
      /home/axel/QtGit/dev/qtbase/src/corelib/doc/snippets/code/src_corelib_serialization_qcborstream.cpp: In function ‘void writeDouble(QCborStreamWriter&, double)’:
      /home/axel/QtGit/dev/qtbase/src/corelib/doc/snippets/code/src_corelib_serialization_qcborstream.cpp:164:24: error: conversion from ‘float’ to non-scalar type ‘qfloat16’ requested
       164 |         qfloat16 f16 = f;
      

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            axelspoerl Axel Spoerl
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes