Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

reserved identifier violation #7

Closed
elfring opened this Issue Apr 9, 2015 · 3 comments

Comments

Projects
None yet
3 participants

elfring commented Apr 9, 2015

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?

Contributor

kmcdonell commented Apr 9, 2015

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.

elfring commented Apr 10, 2015

How do you think about to avoid that this software depends on undefined behaviour?

Contributor

natoscott commented Apr 22, 2015

Have pushed the header macro fixes Ken aluded to, and agree re unfixable double-underscore API/ABI prefixing on some libpcp functions.

@natoscott natoscott closed this Apr 22, 2015

natoscott added a commit that referenced this issue Apr 23, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment