diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2021-01-11 11:53:32 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2021-02-09 16:57:52 -0300 |
commit | c8ba52ab3350c334d6e34b1439a4c0c1431351f3 (patch) | |
tree | a1eaf3602326da019363fd219d1ba92b8b6ed2e7 /conform | |
parent | 7dd416491e080456fc7742d884c520526509413e (diff) | |
download | glibc-c8ba52ab3350c334d6e34b1439a4c0c1431351f3.tar.gz glibc-c8ba52ab3350c334d6e34b1439a4c0c1431351f3.tar.xz glibc-c8ba52ab3350c334d6e34b1439a4c0c1431351f3.zip |
misc: Sync cdefs.h with gnulib
It adds __glibc_has_builtin, __glibc_has_extension, and __attribute_maybe_unused__ alongsize with some fixes. The differences are: --- glibc +++ gnulib @@ -259,7 +259,9 @@ # define __attribute_const__ /* Ignore */ #endif -#if __GNUC_PREREQ (2,7) || __glibc_has_attribute (__unused__) +#if defined __STDC_VERSION__ && 201710L < __STDC_VERSION__ +# define __attribute_maybe_unused__ [[__maybe_unused__]] +#elif __GNUC_PREREQ (2,7) || __glibc_has_attribute (__unused__) # define __attribute_maybe_unused__ __attribute__ ((__unused__)) #else # define __attribute_maybe_unused__ /* Ignore */ @@ -485,7 +487,7 @@ /* The #ifndef lets Gnulib avoid including these on non-glibc platforms, where the includes typically do not exist. */ -#ifdef __GLIBC__ +#ifndef __WORDSIZE # include <bits/wordsize.h> # include <bits/long-double.h> #endif The [[__attribute_maybe_unused__]] attribute removal __ is due Joseph questioning gcc support with -std=c2x or -std=gnu2x [1]. The _WORDSIZE replacement by __GLIBC__ is because it does not play well with internal cdefs.h that also uses __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI. Checked on x86_64-linux-gnu. [1] https://sourceware.org/pipermail/libc-alpha/2021-January/121600.html
Diffstat (limited to 'conform')
0 files changed, 0 insertions, 0 deletions