[PATCH 1/5] posix: Sync regex code with gnulib

Paul Eggert eggert@cs.ucla.edu
Wed Jan 20 17:46:03 GMT 2021


On 1/20/21 3:27 AM, Adhemerval Zanella wrote:
>> #if defined __STDC_VERSION__ && 201710L < __STDC_VERSION__
>> # define __attribute_fallthrough__ [[__fallthrough__]]
>> #elif __GNUC_PREREQ (7, 0) || __glibc_has_attribute (__fallthrough__)
>> # define __attribute_fallthrough__ __attribute__ ((__fallthrough__))
>> #else
>> # define __attribute_fallthrough__ ((void) 0)
>> #endif
> Yes, for 2.34 I will send some patches to sync the remaining gnulib
> files and document from our part the shared files.

On thinking about it more (for 2.34), I find that I would prefer the 
current Gnulib practice of using 'FALLTHROUGH;' to using 
'__attribute_fallthrough__;' in code, and so suggest Gnulib's approach 
of having an attribute.h file (purely for internal glibc use) that has 
"#define FALLTHROUGH __attribute__ (__fallthrough__)' etc.


More information about the Libc-alpha mailing list