Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[libc] fix -Wconversion in float_to_string.h (#74369)
Fixes: libc/src/__support/float_to_string.h:551:48: error: conversion from ‘long unsigned int’ to ‘int32_t’ {aka ‘int’} may change value [-Werror=conversion] 551 | const int32_t shift_amount = SHIFT_CONST + (-exponent - IDX_SIZE * idx); | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Observed in gcc fullbuilds. IDX_SIZE is a size_t (aka 'long unsigned int'), but has the value 128, so the expression is undergoing implicit promotion. Link: https://lab.llvm.org/buildbot/#/builders/250/builds/14891
- Loading branch information