On 29.08.2026 16:04, Nicola Vetrini wrote:
> On 2026-08-28 09:04, Jan Beulich wrote:
>> BUILD_ERROR() is even stronger a guard than assertions in general, and
>> ASSERT_UNREACHABLE() (or BUG()) in particular. Deviate it just like
>> those
>> to allow use for marking unreachable portions of code.
>>
>> In some cases code being unreachable is dependent upon configuration.
>> Introduce two variants, as constructs like
>>
>> if ( IS_ENABLED(CONFIG_...) )
>> BUILD_ERROR("...");
>>
>> results in the if() still being reported as unreachable. Sadly these
>> two
>> new macros introduce a new 20.12 violation each, which hence also needs
>> deviating.
>>
>> Signed-off-by: Jan Beulich <[email protected]>
>
> Reviewed-by: Nicola Vetrini <[email protected]>
Thanks.
> Presumably you did not fold at least one of the following patches where
> the construct is actually used into this one to separate concerns?
Partly for that, partly to keep subsequent patches possible to go in
independently, i.e. in any order.
Jan