| Summary: | c++ parser reports problem at ranged case statement | ||
|---|---|---|---|
| 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 First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Compiled Sources | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
This is not very standard C code... Maybe we can close this one as wont fix. Roberto? Subject: kdevelop/lib/cppparser CVS commit by raggi: gnu extension: case 'a' ... 'z': CCMAIL: 64786-done@bugs.kde.org M +7 -0 parser.cpp 1.23 --- kdevelop/lib/cppparser/parser.cpp #1.22:1.23 @@ -2735,4 +2735,11 @@ bool Parser::parseLabeledStatement( Stat if( !parseConstantExpression(expr) ){ reportError( i18n("expression expected") ); + } else if( lex->lookAhead(0) == Token_ellipsis ){ + lex->nextToken(); + + AST::Node expr2; + if( !parseConstantExpression(expr2) ){ + reportError( i18n("expression expected") ); + } } ADVANCE( ':', ":" ); 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 |
Version: (using KDE KDE 3.1.3) Installed from: Compiled From Sources Compiler: 3.3.1 OS: Linux switch(foo) { case 'b' ... 'r': something(); } reports a problem at the case line.