From: Nicola Vetrini <nicola.vetrini@bugseng.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: xen-devel@lists.xenproject.org,
"Andrew Cooper" <andrew.cooper3@citrix.com>,
"George Dunlap" <george.dunlap@citrix.com>,
"Julien Grall" <julien@xen.org>,
"Stefano Stabellini" <sstabellini@kernel.org>,
"Wei Liu" <wl@xen.org>, "Roger Pau Monné" <roger.pau@citrix.com>
Subject: Re: [PATCH] x86/DMI: adjustments to comply with Misra C:2012 Rule 9.3
Date: Mon, 04 Dec 2023 12:52:03 +0100 [thread overview]
Message-ID: <a9e42c5d486003375aec441b17d33d96@bugseng.com> (raw)
In-Reply-To: <0bf576e1-b9ce-44f5-9866-7b67706a100c@suse.com>
On 2023-11-30 15:56, Jan Beulich wrote:
> On 30.11.2023 08:55, Jan Beulich wrote:
>> The rule demands that all array elements be initialized (or dedicated
>> initializers be used). Introduce a small set of macros to allow doing
>> so
>> without unduly affecting use sites (in particular in terms of how many
>> elements .matches[] actually has; right now there's no use of
>> DMI_MATCH4(), so we could even consider reducing the array size to 3).
>>
>> Note that DMI_MATCH() needs adjustment because of the comma included
>> in
>> its expansion, which - due to being unparenthesized - would otherwise
>> cause macro arguments in the "further replacement" step to be wrong.
>
> Sadly this doesn't work with older gcc (4.8.5 is what I had an issue
> with,
> complaining "initializer element is not constant").
>
> Jan
Hi,
I tried plugging the relevant code into godbolt.org to try gcc-4.8.5,
but I'm not able to reproduce the error (see
https://godbolt.org/z/cP88YeWhh). Can you please provide some more
details on where the issue is?
--
Nicola Vetrini, BSc
Software Engineer, BUGSENG srl (https://bugseng.com)
next prev parent reply other threads:[~2023-12-04 11:52 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-30 7:55 [PATCH] x86/DMI: adjustments to comply with Misra C:2012 Rule 9.3 Jan Beulich
2023-11-30 9:47 ` Nicola Vetrini
2023-11-30 10:14 ` Jan Beulich
2023-11-30 10:27 ` Andrew Cooper
2023-11-30 11:11 ` Nicola Vetrini
2023-11-30 12:00 ` Nicola Vetrini
2023-11-30 12:03 ` Andrew Cooper
2023-11-30 13:09 ` Nicola Vetrini
2023-11-30 14:56 ` Jan Beulich
2023-12-04 11:52 ` Nicola Vetrini [this message]
2023-12-04 12:12 ` Jan Beulich
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=a9e42c5d486003375aec441b17d33d96@bugseng.com \
--to=nicola.vetrini@bugseng.com \
--cc=andrew.cooper3@citrix.com \
--cc=george.dunlap@citrix.com \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=roger.pau@citrix.com \
--cc=sstabellini@kernel.org \
--cc=wl@xen.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.