reserved identifier violation
elfring opened this issue · 3 comments
I would like to point out that identifiers like "_PMAPI_H
" and "__pmSetInternalState
" do not fit to the expected naming convention of the C language standard.
Would you like to adjust your selection for unique names?
Thanks for pointing this out.
The code in question was written 20+ years ago and although it does not conform with the "reserved identifier" clauses of the C standards (even C89 which was the only standard at the time), it has not in practice ever let to a symbol clash that I'm aware of.
We can easily fix the header guard macros.
The symbols in the libraries are more moot ... all the ones beginning __pm were originally low-level routines that were used in the PCP implementation, but not otherwise intended for human consumption. This usage has been warped a little over time, and there has been some debate about these within the PCP developer community and some changes may be made. But backwards ABI compliance will probably be more important, so I'd expect to see these symbols deprecated rather than removed in any changes made in this area.
How do you think about to avoid that this software depends on undefined behaviour?
Have pushed the header macro fixes Ken aluded to, and agree re unfixable double-underscore API/ABI prefixing on some libpcp functions.