[Bug 68704] New: crash when using temporary preprocessor macros (possibly related to code completion)

Ted Cipicchio ted at thereisnospork.com
Fri Nov 21 02:05:06 UTC 2003


------- 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=68704     
           Summary: crash when using temporary preprocessor macros (possibly
                    related to code completion)
           Product: kdevelop
           Version: unspecified
          Platform: Mandrake RPMs
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: crash
          Priority: NOR
         Component: general
        AssignedTo: kdevelop-devel at kdevelop.org
        ReportedBy: ted at thereisnospork.com


Version:           3.0.0 beta 1 (using KDE KDE 3.1.3)
Installed from:    Mandrake RPMs
Compiler:          GCC 3.3 
OS:          Linux

In a C++ project, I have defined a preprocessor macro temporarily to help avoid copying and pasting code for a particular block similar to what's shown below:

int foo (int bar)
{
    int a, b, c, d;
    ...
#define TMP_HELPER_MACRO(X, Y) { ... }
    TMP_HELPER_MACRO(a, b)
    TMP_HELPER_MACRO(c, d)
#undef TMP_HELPER_MACRO
    ...
}

Let's say I create the #define/#undef statements first and start filling in the calls to TMP_HELPER_MACRO in between them.  If you wait a second after typing the opening parenthesis after TMP_HELPER_MACRO (where you would expect KDevelop's code completion to try to come up with a hint as to function parameters or such), KDevelop will crash.  For example:

#define TMP_HELPER_MACRO(X, Y) { ... }
    // Type the following line after typing the surrounding #define and #undef lines, and KDevelop will crash.
    TMP_HELPER_MACRO(
#undef TMP_HELPER_MACRO

The name of the macro and the macro's code don't seem to make a difference.  The crash does not occur if you don't write the #undef statement first.

Hopefully this is enough information, but I'll try to provide more if needed.

Thanks,
Ted




More information about the KDevelop-devel mailing list