[Uml-devel] [Bug 119125] New: Preprocessor keywords ignored which causes endless loop in code import
William Cleveland
whclevelandjr at msn.com
Wed Dec 28 11:48:07 UTC 2005
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=119125
Summary: Preprocessor keywords ignored which causes endless loop
in code import
Product: umbrello
Version: unspecified
Platform: SuSE RPMs
OS/Version: Linux
Status: UNCONFIRMED
Severity: crash
Priority: NOR
Component: general
AssignedTo: umbrello-devel.kde.org
ReportedBy: whclevelandjr msn com
Version: (using KDE KDE 3.5.0)
Installed from: SuSE RPMs
OS: Linux
Importing C++ header files that have circular references (using #include) causes the code import to enter a infinite loop and causes the whole KDE to hang.
Problem stems from preprocessor commands being ignored.
One can argue the following example is bad coding form, but gcc, cc, and msvc have no problems with the files.
( This situation presented itself when we decided to place the child classes in seperate header files and still only require the base.h file to be included in the original source code )
Example problem headers:
base.h contains:
#ifndef __BASE__
#define __BASE__
class Base
{
...
}
// children includes
#include "child.h"
#include "child2.h"
#endif
child.h contains:
#ifndef __CHILD__
#define __CHILD__
#include "base.h"
class Child : public Base
{
...
}
#endif
child2.h contains:
#ifndef __CHILD2__
#define __CHILD2__
#include "base.h"
class Child2 : public Base
{
...
}
#endif
More information about the umbrello-devel
mailing list