Introduce sem(...) syntax without function name requirement, e.g. -sem{pure} or -sem(!, pure)
The use of the -sem(...) option is somewhat cumbersome, it requires to duplicate the function name, resulting in two issues:
Copy-pasting the -sem(...) option may result in forgetting to adapt the function name.
There is no way to put the -sem(...) option into a function name agnostic macro like ATTR_REENTRANT.
-sem(..., pure) typically is congruent with reentrancy. In our code we have a macro ATTR_REENTRANT to mark functions that are reentrant (and thus inherently thread-safe). We now have to mark such functions with both macro and -sem(..., pure).
I propose an additional syntax -sem{pure} and/or !sem(...) or -sem(!, ...) that does not require to replicate the function name. Such syntax would solve both above stated issues.
PS: https://support.pclintplus.com/forums/225702-general/suggestions/5579974-make-wildcards-work-in-sem-statements is nice but still requires to fill-in part of the function name.
Thank you for your feedback and working with us to come up with a resolution. This issue can be resolved by using the option:
++d"ATTR_REENTRANT=__attribute__((pure))"
which will cause PC-lint Plus to expand the ATTR_REENTRANT macro to __attribute__((pure)) which PC-lint Plus will recognize and automatically be converted to a pure semantic as long as the fca flag is active (which it is by default).