On 22.06.2023 10:15, Nicola Vetrini wrote:
> On 21/06/23 10:48, Jan Beulich wrote:
>> On 21.06.2023 09:58, Nicola Vetrini wrote:
>>> -#define BUILD_BUG_ON_ZERO(cond) sizeof(struct { int:-!!(cond); })
>>> +#define BUILD_BUG_ON_ZERO(cond) \
>>> +(sizeof(struct { unsigned u : (cond) ? -1 : sizeof(
On 21/06/23 10:48, Jan Beulich wrote:
On 21.06.2023 09:58, Nicola Vetrini wrote:
Redefine BUILD_BUG_ON_ZERO to fully comply with C99 avoiding
undefined behavior 58 ("A structure or union is defined as
containing no named members (6.7.2.1)."
Here and in the title I'm not happy about you refe
On 21.06.2023 09:58, Nicola Vetrini wrote:
> Redefine BUILD_BUG_ON_ZERO to fully comply with C99 avoiding
> undefined behavior 58 ("A structure or union is defined as
> containing no named members (6.7.2.1)."
Here and in the title I'm not happy about you referencing undefined
behavior. What we do
Redefine BUILD_BUG_ON_ZERO to fully comply with C99 avoiding
undefined behavior 58 ("A structure or union is defined as
containing no named members (6.7.2.1)."
The chosen ill-formed construct is a negative bitwidth in a
bitfield within a struct containing at least one named member,
which prevents