Bug 64783

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:

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