On 04.12.2023 12:52, Nicola Vetrini wrote:
> 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").
> 
> 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?

It apparently doesn't like the compound literal as initializer. I need
to re-submit the adjusted patch, though.

Jan

Reply via email to