Link [ NetBSD | NetBSD OpenGrok source search | PR fulltext-search | Summary of daily snapshot builds | history of daily build result | pkgsrc commit viewer ]


   
        usage: [branch:branch] [user:user] [path@revision] keyword [... [-excludekeyword [...]]] (e.g. branch:MAIN sys/arch/arm, if_wm.c@1.234 )




switch to index mode

recent branches: MAIN (6h)  netbsd-10 (18d)  netbsd-9 (18d)  netbsd-8 (23d) 

2024-06-04 01:26:58 UTC Now

2021-01-05 23:07:49 UTC MAIN commitmail json YAML

lint: clean up symbolic operator names that are used in the messages

Including the "p" in the symbolic operator names was questionable, for
several reasons:

1.  The "p" could be taken to mean an actual variable name, which is
    confusing if the function doesn't have such a variable, or even more
    so if the line contains an unrelated variable called "p".

2.  For the binary operators, having the "p" mentioned on both sides of
    the operator (such as in "p + p") wrongly suggested that both
    operands of the expression were the same.

3.  The name "p" often stands for a pointer.  Most of the operators
    don't accept pointers, therefore the name was misleading.

For these reasons, the "p" was removed from the symbolic name of all
operators.  This makes several pairs of operators indistinguishable:

    INCBEF == INCAFT
    DECBEF == DECAFT
    UPLUS == PLUS
    UMINUS == MINUS
    STAR == MULT
    AMPER == AND

This is not expected to create any confusion since C programmers are
expected to know these double meanings.

The symbolic names for SHLASS and SHRASS were missing the '=' before.
This was added since omitting it was probably an oversight.

(rillig)