On Sun, 16 Nov 2025, Alejandro Colomar wrote:

> Allow it syntactically, but diagnose it with a new -Wmaxof-bool, enabled
> by -Wextra.

I don't see much reason for this option, and certainly not for including 
it in -Wextra.  Warning for this feature implies someone might write code 
that (a) uses this feature (probably in type-generic macros), (b) does so 
on bool, and (c) does not in fact expect to get the answers 1 and 0 from 
applying it to bool, or is somehow applying it to bool accidentally and 
unintentionally in a context that won't actually work for bool.

Warnings shouldn't be in -Wextra simply because of not seeing a use for a 
particular feature or combination of features, there should be some reason 
to believe that the use of the feature actually indicates a defect in the 
code (whether one that makes it misbehave at runtime, or simply one that 
indicates that code not using that feature would in some way be cleaner).

-- 
Joseph S. Myers
[email protected]

Reply via email to