Version: (using KDE KDE 3.2.3) Installed from: Compiled From Sources Several c++ application templates use reserved macro names as include guards. kdevelop/languages/cpp/app_templates/kbearimportfilter/plugin.h uses for example #define __KBEAR_%{APPNAMEUC}_IMPORT_FILTER_H__ Macros starting with a underscore are reserved to the implementation. More information can be found in the c++ standard ยง17.4.3.1.2.
Feel free to provide a patch
Is there actually a compiler where this causes a problem?
There is no compiler that checks this rule and I guess there will never be one. But this rule might prevent some headaches in the future when the compiler vendor chooses a name used in the program. For example our internal list implementation used _LIST_H as include guard. This worked until we upgraded to a newer GCC version. However one can be sure that the compiler vendor never chooses a name without a leading underscore.
Thanks for the reply. However, i think this will stay for quite a while - as all the templates would have to be fixed. But i'll definitive add this to my personal todo list as a) Change all CPP/C tempaltes b) Include this information in the next "Tutorial for Template-Developers"
not going to happen for kdev3 and kdev4 templates don't use __ include guards.