[Bug string/33733] New: glibc-2.43 fails to build, clang-21, i486, strtod_l.c:876:18: error: result of comparison of constant 9223372036854775807 with expression of type 'size_t' (aka 'unsigned int') is always true
dilfridge at gentoo dot org
sourceware-bugzilla@sourceware.org
Sun Dec 21 16:21:23 GMT 2025
https://sourceware.org/bugzilla/show_bug.cgi?id=33733
Bug ID: 33733
Summary: glibc-2.43 fails to build, clang-21, i486,
strtod_l.c:876:18: error: result of comparison of
constant 9223372036854775807 with expression of type
'size_t' (aka 'unsigned int') is always true
Product: glibc
Version: 2.41
Status: NEW
Severity: normal
Priority: P2
Component: string
Assignee: unassigned at sourceware dot org
Reporter: dilfridge at gentoo dot org
Target Milestone: ---
Manual build
CC=clang CXX=clang++ TEST_CC=gcc TEST_CXX=g++ ../glibc/configure
--enable-fortify-source --prefix=/usr
clang version 21.1.8
Target: i486-pc-linux-gnut64
make -j1
master at 0b8a996f44b5f4c02991f02cd12bf05b17db4576
clang strtod_l.c -c -std=gnu11 -fgnu89-inline -g -O2 -Wall -Wwrite-strings
-Wundef -Wimplicit-fallthrough -Werror -fmerge-all-constants -frounding-math
-ftrapping-math -fno-stack-protector -fno-common -U_FORTIFY_SOURCE
-D_FORTIFY_SOURCE=3 -U_FILE_OFFSET_BITS -U_TIME_BITS -Wstrict-prototypes
-Wold-style-definition -fmath-errno -fPIE -ftls-model=initial-exec
-I../include -I/home/dilfridge/Gentoo/misc/glibc-build/stdlib
-I/home/dilfridge/Gentoo/misc/glibc-build
-I../sysdeps/unix/sysv/linux/i386/i686 -I../sysdeps/i386/i686/nptl
-I../sysdeps/unix/sysv/linux/i386 -I../sysdeps/unix/sysv/linux/x86/include
-I../sysdeps/unix/sysv/linux/x86 -I../sysdeps/x86/nptl -I../sysdeps/i386/nptl
-I../sysdeps/unix/sysv/linux/include -I../sysdeps/unix/sysv/linux
-I../sysdeps/nptl -I../sysdeps/pthread -I../sysdeps/gnu
-I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix/i386
-I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/i386/i686/fpu/multiarch
-I../sysdeps/i386/i686/fpu -I../sysdeps/i386/i686/multiarch
-I../sysdeps/i386/i686 -I../sysdeps/i386/fpu -I../sysdeps/x86/fpu
-I../sysdeps/i386 -I../sysdeps/x86/include -I../sysdeps/x86
-I../sysdeps/wordsize-32 -I../sysdeps/ieee754/float128
-I../sysdeps/ieee754/ldbl-96/include -I../sysdeps/ieee754/ldbl-96
-I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754
-I../sysdeps/generic -I.. -I../libio -I. -D_LIBC_REENTRANT -include
/home/dilfridge/Gentoo/misc/glibc-build/libc-modules.h -DMODULE_NAME=libc
-include ../include/libc-symbols.h -DPIC -DTOP_NAMESPACE=glibc -o
/home/dilfridge/Gentoo/misc/glibc-build/stdlib/strtod_l.o -MD -MP -MF
/home/dilfridge/Gentoo/misc/glibc-build/stdlib/strtod_l.o.dt -MT
/home/dilfridge/Gentoo/misc/glibc-build/stdlib/strtod_l.o
strtod_l.c:876:18: error: result of comparison of constant 9223372036854775807
with expression of type 'size_t' (aka 'unsigned int') is always true
[-Werror,-Wtautological-constant-out-of-range-compare]
876 | assert (dig_no <= (uintmax_t) INTMAX_MAX);
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
../assert/assert.h:155:11: note: expanded from macro 'assert'
155 | if (__VA_ARGS__)
\
| ^~~~~~~~~~~
strtod_l.c:906:20: error: result of comparison of constant 2305843009213693683
with expression of type 'size_t' (aka 'unsigned int') is always true
[-Werror,-Wtautological-constant-out-of-range-compare]
906 | assert (int_no <= (uintmax_t) (INTMAX_MAX
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
907 | + MIN_EXP - MANT_DIG)
/ 4);
|
~~~~~~~~~~~~~~~~~~~~~~~~~~
../assert/assert.h:155:11: note: expanded from macro 'assert'
155 | if (__VA_ARGS__)
\
| ^~~~~~~~~~~
strtod_l.c:915:20: error: result of comparison of constant 2305843009213693951
with expression of type 'size_t' (aka 'unsigned int') is always true
[-Werror,-Wtautological-constant-out-of-range-compare]
914 | assert (lead_zero == 0
| ~~~~~~~~~~~~~~~~~~~~~~
915 | && int_no <= (uintmax_t) INTMAX_MAX / 4);
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../assert/assert.h:155:11: note: expanded from macro 'assert'
155 | if (__VA_ARGS__)
\
| ^~~~~~~~~~~
strtod_l.c:927:10: error: result of comparison of constant 2305843009213693695
with expression of type 'size_t' (aka 'unsigned int') is always true
[-Werror,-Wtautological-constant-out-of-range-compare]
926 | assert (lead_zero
| ~~~~~~~~~~~~~~~~~
927 | <= (uintmax_t) (INTMAX_MAX - MAX_EXP - 3)
/ 4);
|
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../assert/assert.h:155:11: note: expanded from macro 'assert'
155 | if (__VA_ARGS__)
\
| ^~~~~~~~~~~
strtod_l.c:939:6: error: result of comparison of constant 9223372036854775447
with expression of type 'size_t' (aka 'unsigned int') is always true
[-Werror,-Wtautological-constant-out-of-range-compare]
938 | assert (int_no
| ~~~~~~~~~~~~~~
939 | <= (uintmax_t) (INTMAX_MAX + MIN_10_EXP -
MANT_DIG));
|
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../assert/assert.h:155:11: note: expanded from macro 'assert'
155 | if (__VA_ARGS__)
\
| ^~~~~~~~~~~
strtod_l.c:947:20: error: result of comparison of constant 9223372036854775807
with expression of type 'size_t' (aka 'unsigned int') is always true
[-Werror,-Wtautological-constant-out-of-range-compare]
946 | assert (lead_zero == 0
| ~~~~~~~~~~~~~~~~~~~~~~
947 | && int_no <= (uintmax_t) INTMAX_MAX);
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
../assert/assert.h:155:11: note: expanded from macro 'assert'
155 | if (__VA_ARGS__)
\
| ^~~~~~~~~~~
strtod_l.c:959:10: error: result of comparison of constant 9223372036854775498
with expression of type 'size_t' (aka 'unsigned int') is always true
[-Werror,-Wtautological-constant-out-of-range-compare]
958 | assert (lead_zero
| ~~~~~~~~~~~~~~~~~
959 | <= (uintmax_t) (INTMAX_MAX - MAX_10_EXP -
1));
|
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../assert/assert.h:155:11: note: expanded from macro 'assert'
155 | if (__VA_ARGS__)
\
| ^~~~~~~~~~~
7 errors generated.
make[2]: *** [../o-iterator.mk:9:
/home/dilfridge/Gentoo/misc/glibc-build/stdlib/strtod_l.o] Error 1
make[2]: Leaving directory '/home/dilfridge/Gentoo/misc/glibc/stdlib'
make[1]: *** [Makefile:484: stdlib/subdir_lib] Error 2
make[1]: Leaving directory '/home/dilfridge/Gentoo/misc/glibc'
make: *** [Makefile:20: all] Error 2
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Glibc-bugs
mailing list