All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicola Vetrini <nicola.vetrini@bugseng.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: "Jan Beulich" <jbeulich@suse.com>,
	"Dmytro Prokopchuk1" <dmytro_prokopchuk1@epam.com>,
	"Doug Goldstein" <cardoe@cardoe.com>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Anthony PERARD" <anthony.perard@vates.tech>,
	"Michal Orzel" <michal.orzel@amd.com>,
	"Julien Grall" <julien@xen.org>,
	"Roger Pau Monné" <roger@xenproject.org>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH] misra: deviate C library-style functions from Misra C:2012 rule 11.8
Date: Thu, 01 Oct 2026 15:35:28 +0200	[thread overview]
Message-ID: <a8e271ad6bfa70f8c080d4a454f6f052@bugseng.com> (raw)
In-Reply-To: <3cb25b4c-6470-44a4-bc46-55776317ea67@citrix.com>

On 2026-10-01 15:16, Andrew Cooper wrote:
> On 01/10/2026 1:43 pm, Jan Beulich wrote:
>> On 01.10.2026 14:39, Andrew Cooper wrote:
>>> We want _Generic() for const-correctness reasons only.  (And possibly
>>> API transition work - this has mixed results but can substantially
>>> reduce churn in a series if done well).
>>> 
>>> This depends on moving to C11, which we need to at some point anyway
>>> even if weren't for _Generic().
>> Why is this? Can't we use _Generic() as a compiler extension, i.e. 
>> without
>> fully going to C11?
> 
> AIUI, the parsing rules had to change in C11 to support _Generic()'s
> syntax, and IIRC Eclair can't parse it without specifying C11 or later.
> 

That's not true, ECLAIR copes just fine with _Generic regardless of the 
-std:

0|$ cat p.c
void f(void) {
   int x;
   _Generic(x, int: 0, unsigned: 1);
}
nicola@nico:~
0|$ eclair_env -- gcc -std=c99 -c p.c


-- 
Nicola Vetrini, B.Sc.
Software Engineer
BUGSENG (https://bugseng.com)
LinkedIn: https://www.linkedin.com/in/nicola-vetrini-a42471253


  reply	other threads:[~2026-10-01 13:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-29  9:03 [PATCH] misra: deviate C library-style functions from Misra C:2012 rule 11.8 Dmytro Prokopchuk1
2026-09-29  9:11 ` Nicola Vetrini
2026-09-29 13:40 ` Jan Beulich
2026-09-29 14:56   ` Nicola Vetrini
2026-09-29 15:11     ` Jan Beulich
2026-09-29 17:52       ` Nicola Vetrini
2026-10-01 12:39         ` Andrew Cooper
2026-10-01 12:43           ` Jan Beulich
2026-10-01 13:16             ` Andrew Cooper
2026-10-01 13:35               ` Nicola Vetrini [this message]
2026-10-04 21:05           ` Nicola Vetrini
2026-10-13 14:31             ` Dmytro Prokopchuk1

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=a8e271ad6bfa70f8c080d4a454f6f052@bugseng.com \
    --to=nicola.vetrini@bugseng.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=anthony.perard@vates.tech \
    --cc=cardoe@cardoe.com \
    --cc=dmytro_prokopchuk1@epam.com \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=michal.orzel@amd.com \
    --cc=roger@xenproject.org \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /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.