Skip to content

[libc] -Wnarrowing in many _Float16 tests with gcc-14 #124801

@nickdesaulniers

Description

@nickdesaulniers

Running ninja libc-math-smoke-tests with gcc-14 produces a spew of:

llvm-project/libc/test/src/math/smoke/exp2m1f16_test.cpp:74:15: error: ISO C++ does not allow converting to ‘float16’ {aka ‘_Float16’} from ‘double’ with greater conversion rank [-Werror=narrowing]
   74 |   float16 x = -12.0;
      |               ^~~~~

(in many different test files). This is going to block enabling newer gcc in presubmit, and harm our ability to test with gcc until resolved.

cc @lntue @wldfngrs @overmighty

found while trying to test #124036

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions