NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

standards/46223: reserved identifier violation



>Number:         46223
>Category:       standards
>Synopsis:       reserved identifier violation
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    standards-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Mar 18 20:15:01 +0000 2012
>Originator:     Markus Elfring
>Release:        
>Organization:
>Environment:
>Description:
I have looked at a few header files. I see that include guards like "_AIO_H_" 
and "_WORDEXP_H_" are used.
http://cvsweb.netbsd.org/bsdweb.cgi/src/include/aio.h?rev=1.7&content-type=text/x-cvsweb-markup&only_with_tag=MAIN
http://cvsweb.netbsd.org/bsdweb.cgi/src/include/wordexp.h?rev=1.2&content-type=text/x-cvsweb-markup&only_with_tag=MAIN

I am informed that such a name pattern (leading underscore and a following 
uppercase letter) is reserved for the use in implementations of compilers for 
the programming languages C and C++.
https://www.securecoding.cert.org/confluence/display/cplusplus/DCL32-CPP.+Do+not+declare+or+define+a+reserved+identifier#DCL32-CPP.Donotdeclareordefineareservedidentifier-NoncompliantCodeExample%28HeaderGuard%29

I assume that a couple of header files do not belong to C/C++ compiler
implementations here but to operating system implementations. Do any 
preprocessor symbols need further adjustments to make them completely 
standard-compliant?
>How-To-Repeat:

>Fix:



Home | Main Index | Thread Index | Old Index