Skip to content

Commit

Permalink
Fix float16 warning for older clangs (#7701)
Browse files Browse the repository at this point in the history
  • Loading branch information
abadams committed Jul 25, 2023
1 parent f41c392 commit c9bf3b1
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions test/correctness/float16_t.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,8 @@ __attribute__((weak)) float __extendhfsf2(float actually_a_float16) {

#else

// We haven't tested this variant, so emit a warning if we ever compile for it.
#pragma message "This variant of __extendhfsf2 has not been tested."
__attribute__((weak)) float __extendhfsf2(uint16_t data) {
return Halide::float16_t::make_from_bits(data);
return (float)Halide::float16_t::make_from_bits(data);
}

#endif
Expand Down

0 comments on commit c9bf3b1

Please sign in to comment.