diff options
| author | Jakub Jelinek <jakub@redhat.com> | 2024-01-31 19:17:27 +0100 |
|---|---|---|
| committer | Jakub Jelinek <jakub@redhat.com> | 2024-03-04 12:56:27 +0100 |
| commit | 1b9c1a0047fb26a65a9b2a7b8cd977243f7d353c (patch) | |
| tree | d9506d4e9f0f1d84840b41bb0f2299bf6f5a888c /stdlib/Makefile | |
| parent | e0910f1d3278f05439fb434ee528fc9be1b6bd5e (diff) | |
| download | glibc-1b9c1a0047fb26a65a9b2a7b8cd977243f7d353c.tar.xz glibc-1b9c1a0047fb26a65a9b2a7b8cd977243f7d353c.zip | |
Use gcc __builtin_stdc_* builtins in stdbit.h if possible
The following patch uses the GCC 14 __builtin_stdc_* builtins in stdbit.h
for the type-generic macros, so that when compiled with GCC 14 or later,
it supports not just 8/16/32/64-bit unsigned integers, but also 128-bit
(if target supports them) and unsigned _BitInt (any supported precision).
And so that the macros don't expand arguments multiple times and can be
evaluated in constant expressions.
The new testcase is gcc's gcc/testsuite/gcc.dg/builtin-stdc-bit-1.c
adjusted to test stdbit.h and the type-generic macros in there instead
of the builtins and adjusted to use glibc test framework rather than
gcc style tests with __builtin_abort ().
Signed-off-by: Jakub Jelinek <jakub@redhat.com>
Reviewed-by: Joseph Myers <josmyers@redhat.com>
(cherry picked from commit da89496337b97e6a2aaf1e81d55cf998f6db1070)
Diffstat (limited to 'stdlib/Makefile')
| -rw-r--r-- | stdlib/Makefile | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/stdlib/Makefile b/stdlib/Makefile index d587f054d1..9898cc5d8a 100644 --- a/stdlib/Makefile +++ b/stdlib/Makefile @@ -308,6 +308,7 @@ tests := \ tst-setcontext10 \ tst-setcontext11 \ tst-stdbit-Wconversion \ + tst-stdbit-builtins \ tst-stdc_bit_ceil \ tst-stdc_bit_floor \ tst-stdc_bit_width \ |
