Julien Blanc <[email protected]> writes:

> Le mardi 14 juin 2022 à 08:54 +0200, Philippe Gerum a écrit :
>> Julien Blanc via Xenomai 
>> > 
>> > #define __fallthrough      __attribute__((fallthrough))
>> > 
>> 
>> 6.39. attribute syntax
>> https://gcc.gnu.org/onlinedocs/gcc/Attribute-Syntax.html#Attribute-Syntax
>> 
>
> Not sure what you mean with this link. The relevant attribute is
> documented here: 
> https://gcc.gnu.org/onlinedocs/gcc/Statement-Attributes.html
>
>> PS: fixes go with patches.
>
> Indeed, but i'll let Russel do this one as i don't have the opportunity
> to test it right now.
>

The documentation (paragraph 6.39) states that "You may optionally
specify attribute names with ‘__’ preceding and following the name. This
allows you to use them in header files without being concerned about a
possible macro of the same name. For example, you may use the attribute
name __noreturn__ instead of noreturn.".

This is generally used with C attributes as a precaution against
namespace conflicts in the C language space. IOW, making a C++ parser
happy is ok with me as long as this does not introduce potential issues
down the road with regular C code.

-- 
Philippe.

Reply via email to