David Soria Parra:
- if (p-field 0 || GREP_HEADER_FIELD_MAX = p-field)
+ if (GREP_HEADER_FIELD_MAX = p-field)
A friend taught me this trick, which will check that it isn't negative
for compilers that have the enumeration be signed (notably MSVC),
while not
David Soria Parra:
The enum grep_header_field is unsigned.
Enumerations can be either unsigned or signed, it is up to the
compiler to decide. Even if you assign only positive number to named
enumeration values, there are compilers that make them signed. I've
been bitten by that enough.
2 matches
Mail list logo