Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reserved identifier violation #10

Closed
elfring opened this issue Aug 27, 2015 · 8 comments
Closed

reserved identifier violation #10

elfring opened this issue Aug 27, 2015 · 8 comments

Comments

@elfring
Copy link
Contributor

elfring commented Aug 27, 2015

I would like to point out that identifiers like "__tagged_value" and "_HL_HASHTABLE_H_" do eventually not fit to the expected naming convention of the C language standard.
Would you like to adjust your selection for unique names?

@elfring elfring mentioned this issue Aug 27, 2015
@xant
Copy link
Owner

xant commented Aug 27, 2015

will fix by removing the underscores from all headers

@dgryski
Copy link
Collaborator

dgryski commented Aug 27, 2015

@elfring are you actually using this package or just making sure it fits a set of style guidelines?

@elfring
Copy link
Contributor Author

elfring commented Aug 27, 2015

Some uses of double underscores should also be reconsidered, shouldn't it?

Can C standard-compliance help you to reduce the error probability around specific implementation details?

@xant
Copy link
Owner

xant commented Aug 27, 2015

isn't that c++ ?

@xant
Copy link
Owner

xant commented Aug 27, 2015

19c7df2

@xant xant closed this as completed Aug 27, 2015
@elfring
Copy link
Contributor Author

elfring commented Aug 27, 2015

Thanks for your improvement of affected include guards.

There are a few update candidates left over.

@xant
Copy link
Owner

xant commented Aug 27, 2015

but those are macro arguments ... I think there is no point in changing those since their scope is limited to the actual macro implementation. Is this being reported by some analyzer?

@elfring
Copy link
Contributor Author

elfring commented Aug 27, 2015

Macro arguments are also identifiers. Would you like to clean-up the remaining source code places which tamper still with the reserved name space?

elfring added a commit to elfring/libhl that referenced this issue Aug 29, 2015
Some identifiers did not fit to the expected naming convention of the
C language standard.
https://www.securecoding.cert.org/confluence/display/c/DCL37-C.+Do+not+declare+or+define+a+reserved+identifier

This detail was fixed by the deletion of leading underscores.

A few macro parameters were enclosed by additional parentheses.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants