Skip to content

Commit aabdd8f

Browse files
authored
[libc] Fix compilation errors thrown by GCC (#112351)
1 parent 1c38c46 commit aabdd8f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

libc/src/__support/str_to_integer.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ strtointeger(const char *__restrict src, int base,
115115
: cpp::numeric_limits<T>::max();
116116
ResultType const abs_max =
117117
(is_positive ? cpp::numeric_limits<T>::max() : NEGATIVE_MAX);
118-
ResultType const abs_max_div_by_base = abs_max / base;
118+
ResultType const abs_max_div_by_base =
119+
static_cast<ResultType>(abs_max / base);
119120

120121
while (src_cur < src_len && isalnum(src[src_cur])) {
121122
int cur_digit = b36_char_to_int(src[src_cur]);

libc/src/math/generic/exp2m1f16.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ LLVM_LIBC_FUNCTION(float16, exp2m1f16, (float16 x)) {
126126
case FE_DOWNWARD:
127127
return FPBits::one(Sign::NEG).get_val();
128128
default:
129-
return -0x1.ffcp-1;
129+
return fputil::cast<float16>(-0x1.ffcp-1);
130130
}
131131
}
132132

0 commit comments

Comments
 (0)