Default the pure ANSI/ISO C standard functions to -sem(..., pure)
Several messages (e.g. 523 and 9007) deal with potential side-effects. This is great, but the implementation has room for improvement:
if ((s != NULL) && ((strlen(s) > 0U)))
I think it is safe to say that strlen() never has side-effects. But PC-lint Plus doesn't think so and issues message 9007 for the above piece of code.
This issue applies to any function of the standard library. In most cases, e.g. strlen() or isnan() it should be clear whether or not the function has side-effects, most of these functions are implemented re-entrant. Unfortunately, as far I know, the C standard is not clear enough in this respect. Still, PC-lint Plus should default all ANSI/ISO C standard functions that are known to be pure to -sem(..., pure).
Note that currently the -sem(... pure) option is way less useful if standard library functions are involved, as lint now often complains on calls to standard library functions. To work around this, every user of PC-lint Plus eventually comes up with some own list like:
-sem(isalnum, pure) // <ctype.h>
-sem(isalpha, pure) // <ctype.h>
-sem(isblank, pure) // <ctype.h>
-sem(iscntrl, pure) // <ctype.h>
-sem(isdigit, pure) // <ctype.h>
-sem(isgraph, pure) // <ctype.h>
-sem(islower, pure) // <ctype.h>
-sem(isprint, pure) // <ctype.h>
-sem(ispunct, pure) // <ctype.h>
-sem(isspace, pure) // <ctype.h>
-sem(isupper, pure) // <ctype.h>
-sem(isxdigit, pure) // <ctype.h>
-sem(toupper, pure) // <ctype.h>
-sem(tolower, pure) // <ctype.h>
-sem(memchr, pure) // <string.h>
-sem(memcmp, pure) // <string.h>
-sem(strcat, pure) // <string.h>
-sem(strcats, pure) // <string.h>
-sem(strncat, pure) // <string.h>
-sem(strncats, pure) // <string.h>
-sem(strchr, pure) // <string.h>
-sem(strrchr, pure) // <string.h>
-sem(strcmp, pure) // <string.h>
-sem(strncmp, pure) // <string.h>
-sem(strcoll, pure) // <string.h>
-sem(strcolll, pure) // <string.h>
-sem(strcpy, pure) // <string.h>
-sem(strcpys, pure) // <string.h>
-sem(strncpy, pure) // <string.h>
-sem(strncpy_s, pure) // <string.h>
-sem(strerror, pure) // <string.h>
-sem(strlen, pure) // <string.h>
-sem(strnlen, pure) // <string.h>
-sem(strspn, pure) // <string.h>
-sem(strcspn, pure) // <string.h>
-sem(strstr, pure) // <string.h>
-sem(strtok, pure) // <string.h>
-sem(strxfrm, pure) // <string.h>
-sem(abs, pure) // <stdlib.h>
-sem(labs, pure) // <stdlib.h>
-sem(llabs, pure) // <stdlib.h>
-sem(fabs, pure) // <stdlib.h>, <math.h>
-sem(fabsf, pure) // <stdlib.h>
-sem(fabsl, pure) // <stdlib.h>
-sem(div, pure) // <stdlib.h>
-sem(ldiv, pure) // <stdlib.h>
-sem(lldiv, pure) // <stdlib.h>
-sem(acos, pure) // <math.h>
-sem(asin, pure) // <math.h>
-sem(atan, pure) // <math.h>
-sem(atan2, pure) // <math.h>
-sem(ceil, pure) // <math.h>
-sem(cos, pure) // <math.h>
-sem(cosh, pure) // <math.h>
-sem(exp, pure) // <math.h>
-sem(floor, pure) // <math.h>
-sem(fmod, pure) // <math.h>
-sem(fpclassify, pure) // <math.h>
-sem(frexp, pure) // <math.h>
-sem(frexpf, pure) // <math.h>
-sem(isfinite, pure) // <math.h>
-sem(isinf, pure) // <math.h>
-sem(isnan, pure) // <math.h>
-sem(isnormal, pure) // <math.h>
-sem(ldexp, pure) // <math.h>
-sem(log, pure) // <math.h>
-sem(modf, pure) // <math.h>
-sem(pow, pure) // <math.h>
-sem(signbit, pure) // <math.h>
-sem(sin, pure) // <math.h>
-sem(sinh, pure) // <math.h>
-sem(sqrt, pure) // <math.h>
-sem(tan, pure) // <math.h>
-sem(tanh, pure) // <math.h>
Note that other parts of PC-lint Plus also handle ANSI/ISO C standard items, e.g. manual.pdf page 134 lists all headers files that are treated as "ansi" libclass.