Skip to content
Commit 1b9c1a00 authored by Jakub Jelinek's avatar Jakub Jelinek
Browse files

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: default avatarJakub Jelinek <jakub@redhat.com>
Reviewed-by: default avatarJoseph Myers <josmyers@redhat.com>
(cherry picked from commit da894963)
parent e0910f1d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment