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 #132

Open
elfring opened this issue Dec 2, 2023 · 3 comments
Open

reserved identifier violation #132

elfring opened this issue Dec 2, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@elfring
Copy link

elfring commented Dec 2, 2023

I would like to point out that identifiers like “_MATRIX_UTILS_H_” and “_TRANSFORM_FUNCTIONS_H_do not fit to the expected naming convention of the C++ language standard.
Would you like to adjust your selection for unique names?

@christophe0606
Copy link
Contributor

@elfring Have you observed any name clash with reserved names ?

@christophe0606 christophe0606 added the review Under review label Dec 4, 2023
@elfring
Copy link
Author

elfring commented Dec 4, 2023

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

@christophe0606 christophe0606 added enhancement New feature or request and removed review Under review labels Dec 4, 2023
@escherstair
Copy link

According to C standard, rule 7.1.3 states

Do not declare or define a reserved identifier
All identifiers that begin with an underscore and either an uppercase letter or another underscore are always reserved for any use.
All identifiers that begin with an underscore are always reserved for use as identifiers with file scope in both the ordinary and tag name spaces.
Each macro name in any of the following subclauses (including the future library directions) is reserved for use as specified if any of its associated headers is included, unless explicitly stated otherwise.
All identifiers with external linkage (including future library directions) and errno are always reserved for use as identifiers with external linkage.
Each identifier with file scope listed in any of the following subclauses (including the future library directions) is reserved for use as a macro name and as an identifier with file scope in the same name space if any of its associated headers is included.

I would appreciate if CMSIS DSP headers could be made compliant to this rule.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants