Bug 101179 - Parsing error when ';' in #define
Summary: Parsing error when ';' in #define
Status: RESOLVED DUPLICATE of bug 60512
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (old) (show other bugs)
Version: 3.1.1
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-09 15:16 UTC by Tommaso Schiavinotto
Modified: 2013-03-31 00:57 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tommaso Schiavinotto 2005-03-09 15:16:37 UTC
Version:           3.1.1 (using KDE KDE 3.3.1)
Installed from:    Unspecified Linux

Fedora Core 3.

C++ project, active Language is C++.

Opening a file that contains (or switching to a tab):

....

XERCES_CPP_NAMESPACE_USE

class SAX2PrintHandlers : public DefaultHandler, private XMLFormatTarget

....

Where XERCES_CPP_NAMESPACE_USE is defined in Xerces-c headers:
#define XERCES_CPP_NAMESPACE_USE using namespace XERCES_CPP_NAMESPACE;

The line in the program that start with "class" is marked as wrong because of the missing ;
at the end of the previous line.

So far the problem is similar to http://bugs.kde.org/show_bug.cgi?id=34438

If the active language is changed to C the line is no longer marked as wrong.
If I switch back to C++ it is marked again... going once more to C leave the line marked, after
this no matters how many time the active language is changed the problem persists.

If the starting Active language is C the error is raised, and disappear switching to C++, 
switching back to C has the same result to definitively raise the error.

If I change tab and go back to the previous one I can change once (only once) the active language to 
remove the problem.

If before the use of XERCES_CPP_NAMESPACE_USE I write something like:
#ifndef XERCES_CPP_NAMESPACE_USE
#define XERCES_CPP_NAMESPACE_USE
#endif

The "class" line is given as correct, if I put those lines in a local header I have the same problems.

I tried to configure the macro in the C++ Parser but the problem persists.
Comment 1 Jens Dagerbo 2005-03-10 14:24:54 UTC
Is this report different in any important way from bug #60512?

I don't believe the "active language" setting really matters here. It might appear to, but I suspect that is just a side effect of the language support plugin reload. Either way, the "active language" feature is removed from KDevelop from 3.2.

See also this thread: http://www.kdevelop.org/phorum5/read.php?2,27102
Comment 2 Tommaso Schiavinotto 2005-03-10 14:39:47 UTC
It is actually the same behaviour of the last example in bug #60512, but I could not find the active language behaviour in that place, I found strange the not
deterministic behaviour.

About that thread, it was me that started it, before they could point me out 
to not file the bug I had already done it.

 
Comment 3 Jens Dagerbo 2005-03-11 13:00:05 UTC
Sounds like a dupe then.

*** This bug has been marked as a duplicate of 60512 ***
Comment 4 Aleix Pol 2013-03-31 00:57:43 UTC
Moving all the bugs from the CPP Parser. It was not well defined the difference between it and C++ Language Support and people kept reporting in both places indistinctively