Summary: | c++ parser breaks at "restrict" type qualifier | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | Gunther Piez <gpiez> |
Component: | Language Support: CPP (old) | Assignee: | KDevelop Developers <kdevelop-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Gunther Piez
2003-09-23 10:00:44 UTC
Subject: kdevelop/lib/cppparser CVS commit by raggi: gnu extension: ignore 'restrict' qualifier CCMAIL: 64783-done@bugs.kde.org M +1 -0 driver.cpp 1.12 --- kdevelop/lib/cppparser/driver.cpp #1.11:1.12 @@ -311,4 +311,5 @@ void Driver::setupLexer( Lexer * lexer ) lexer->addSkipWord( "__glibcpp_class4_requires", SkipWordAndArguments ); lexer->addSkipWord( "__glibcpp_function_requires", SkipWordAndArguments ); + lexer->addSkipWord( "restrict" ); lexer->addSkipWord( "__BEGIN_NAMESPACE_STD" ); I have another problem with the restrict keyword: The kdevelop editor constantly marks a method like this class X { void restrict(); }; as an error, although AFAIK restrict is not a C++ keyword (only in C). (Also, there is no compiler error with restrict() as opposed to defining a method void volatile(); which will make g++ say "error: expected unqualified-id before ‘)’ token".) 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 |