Version: 3.5.5 (using KDE 4.2.4) Installed from: SuSE RPMs I have created a simple project with the name "abc" for a KDE application from the standard templates. I have noticed that a header file was generated that contains the include guard "_ABC_H_". This suggestion would only be acceptable if I would like to develop a C/C++ compiler implementation. Names that begin with an underscore and an upper-case letter specify reserved identifiers. See also the similar issue "Do not complete to reserved identifiers" (bug #185901). I guess that some software developers overlook this detail after the extension of the "Hello World" application. It might also be that some source file maintainers get used to a potentially wrong naming convention.
kdevelop4 ships no templates that use _%{APPNAME}_H_, so unless you specify "_abc_" as app name you won't get these guards (and in case you do, its your own fault).
Might the potentially wrong application of patterns in templates might become a security issue for KDevelop 3.x? Do all KDevelop 4.y source files adhere to the correct naming convention?
(In reply to comment #2) > Might the potentially wrong application of patterns in templates might become a > security issue for KDevelop 3.x? I fail to see how using _FOO_H_ is a security issue. And even if it were, kdevelop3 is dead, it won't see any changes (in particular it won't see any changes to all its templates). > Do all KDevelop 4.y source files adhere to the correct naming convention? No. But thats not what this bug is about, right? This is about the templates and those are fixed. The few headers we do have that have a _ or __ as prefix are rather unproblematic as its extremely unlikely for them to clash with compiler-defines. Some of the code is also imported from the outside and hence cannot be changed.
(In reply to comment #3) > No. But thats not what this bug is about, right? Should this open issue be continued in a new bug report? > This is about the templates and those are fixed. I guess that another look will be needed when old files will be converted and imported into the new KDevelop 4 infrastructure that is in the works.
(In reply to comment #4) > (In reply to comment #3) > > No. But thats not what this bug is about, right? > > Should this open issue be continued in a new bug report? Feel free to do so, but don't expect a fix. Its a naming convention, not a rule. No compiler complains about those define's and as I said its highly unlikely that any of them will ever create a problem. They're totally unrelated to anything a compiler does. Also you skipped the part about security-problems ;) > > This is about the templates and those are fixed. > > I guess that another look will be needed when old files will be converted and > imported into the new KDevelop 4 infrastructure that is in the works. There won't be any imports from "old kdevelop". If your project uses define's starting with an _, then thats your projects problem. KDevelop is not going to fixup a project.
(In reply to comment #5) > Feel free to do so, but don't expect a fix. The story will be continued in the issue "Corrections for reserved identifier violations" (bug #206793). > Also you skipped the part about security-problems ;) Will it become a problem when software runs in unexpected ways because "too unlikely" name clashes were not noticed?