All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: Julien Blanc <julien.blanc@sprinte.eu>
Cc: "rpm@xenomai.org" <rpm@xenomai.org>,
	"Xenomai@xenomai.org" <Xenomai@xenomai.org>
Subject: Re: <evl/heap.h> compile conflict with Boost
Date: Tue, 14 Jun 2022 11:01:22 +0200	[thread overview]
Message-ID: <87y1xzr4il.fsf@xenomai.org> (raw)
In-Reply-To: <7ed5f664d9a0df0a14ce88d684dc0f4f7b389a05.camel@sprinte.eu>


Julien Blanc <julien.blanc@sprinte.eu> writes:

> Le mardi 14 juin 2022 à 10:04 +0200, Philippe Gerum a écrit :
>> Julien Blanc <
>> julien.blanc@sprinte.eu
>> > 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.
>
> Missed that part, thanks. The issue here is thus not within the
> attribute part, which can be either fallthrough or __fallthrough__, but
> only in the macro name, which should be __fallthrough instead of just
> fallthrough.

Fine by me now, two remarks though: as Florian noted, this patch breaks
all current users in libevl, plus a meaningful commit log explaining why
such change is needed would helpful for reviewers.
(e.g. fixing conflict with C++ [[fallthough]], and maybe at some point
in the future with the C2X standard).

-- 
Philippe.


  parent reply	other threads:[~2022-06-14  9:01 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-13 14:39 <evl/heap.h> compile conflict with Boost Russell Johnson
2022-06-13 15:17 ` Julien Blanc
2022-06-13 21:25   ` [External] - " Russell Johnson
2022-06-14  6:54   ` Philippe Gerum
2022-06-14  7:08     ` Julien Blanc
2022-06-14  8:04       ` Philippe Gerum
2022-06-14  8:29         ` Julien Blanc
2022-06-14  8:41           ` Bezdeka, Florian
2022-06-14  9:01           ` Philippe Gerum [this message]
2022-06-14  9:44             ` Bezdeka, Florian
2022-06-14 10:34               ` Julien Blanc
2022-06-14 10:43                 ` Philippe Gerum
2022-06-14 13:27                   ` [External] - " Russell Johnson
2022-06-14 14:05                     ` Philippe Gerum
2022-06-14 14:18 Russell Johnson
2022-06-14 14:53 ` Philippe Gerum
2022-06-14 15:11 ` Jan Kiszka
2022-06-14 15:22   ` Philippe Gerum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y1xzr4il.fsf@xenomai.org \
    --to=rpm@xenomai.org \
    --cc=Xenomai@xenomai.org \
    --cc=julien.blanc@sprinte.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.