Bug 64783 - c++ parser breaks at "restrict" type qualifier
Summary: c++ parser breaks at "restrict" type qualifier
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (old) (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: KDevelop Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-23 10:00 UTC by Gunther Piez
Modified: 2013-03-31 00:48 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gunther Piez 2003-09-23 10:00:44 UTC
Version:            (using KDE KDE 3.1.3)
Installed from:    Compiled From Sources
Compiler:          gcc-3.3.1 
OS:          Linux

if you have a struct or class containing a "restrict" member, it doesn't show up in the classparser anymore. "restrict" should behave like "volatile" or "const".
Comment 1 Roberto Raggi 2003-11-04 16:11:36 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" );


Comment 2 Roland Pabel 2007-01-24 18:32:25 UTC
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".)
Comment 3 Aleix Pol 2013-03-31 00:48:53 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