reserved identifier violation [$5] #275

Open
opened 2026-10-05 04:09:20 +02:00 by adam · 2 comments
Owner

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

--- There is a **[$5 open bounty](https://www.bountysource.com/issues/1331675-reserved-identifier-violation?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github)** on this issue. Add to the bounty at [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github).
I would like to point out that identifiers like "[`_WEBMODULES_H`](https://github.com/znc/znc/blob/3e56f093f2c21cd9ea72452773f9fc6a8fdba481/include/znc/WebModules.h#L17)" and "[`_SQL`](https://github.com/znc/znc/blob/b2dcad5fd49e6c0d604de38c311db0e08ed061a7/include/znc/ZNCString.h#L27)" [do not fit](https://www.securecoding.cert.org/confluence/display/cplusplus/DCL32-CPP.+Do+not+declare+or+define+a+reserved+identifier#DCL32-CPP.Donotdeclareordefineareservedidentifier-NoncompliantCodeExample%28HeaderGuard%29) to the expected naming convention of the C++ language standard. Would you like to adjust your selection for unique names? ## <bountysource-plugin> --- There is a **[$5 open bounty](https://www.bountysource.com/issues/1331675-reserved-identifier-violation?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github)** on this issue. Add to the bounty at [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github). </bountysource-plugin> <!-- github-sync-id:23150087 -->
Author
Owner

Thanks for pointing these issues out, and pull requests are welcome :)

Thanks for pointing these issues out, and pull requests are welcome :) <!-- github-comment-id:29095150 -->
Author
Owner

What about #pragma once? While not standard, just about every compiler supports it. And it's faster than preprocessor directives.

What about [#pragma once](https://en.wikipedia.org/wiki/Pragma_once)? While not standard, just about every compiler supports it. And it's faster than preprocessor directives. <!-- github-comment-id:460903003 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/znc#275