Re: git: b40c0db6f6d6 - main - Patch up __diagused for when only one of INVARIANTS or WITNESS is defined
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 27 Apr 2022 22:14:49 UTC
Just a suggestion . . . For: QUOTE +#elif ((defined(INVARIANTS) && !defined(WITNESS)) || \ + (!defined(INVARIANTS) && defined(WITNESS))) #define __diagused __unused END QUOTE something like the following seems far more direct to me: +#elif defined(INVARIANTS) != defined(WITNESS) #define __diagused __unused Boolean == and != are well defined, even in languages where Boolean is fully distinct from numeric types. Expressing everything via NOT, AND, and possible OR makes various notations messy for simple concepts. Hardware folks call != by the name XOR instead of inequality. Equal length "vectors" of Booleans have != and XOR being distinct, XOR being a "Booleanwise" (bitwise) != producing a vector of Booleans, the resulting vector again being of matching length. By contrast != for equal length vectors of Booleans producing just one overall Boolean for if the count of non-matching Booleans in an XOR would be positive (TRUE) vs. zero (FALSE). Food for thought. === Mark Millard marklmi at yahoo.com