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: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Gunther Piez
2003-09-23 10:30:40 UTC
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 |