Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Kucera2009-11-15 20:59:49 -0500
committerMike Kucera2009-11-15 20:59:49 -0500
commit85cd3751d53946c754e8e3c7f55b7ea214d7eac6 (patch)
tree38819c8c83a431bc0460f7046feec574624cd067
parentad638017930e4b45b83d4933d859d3080caf30cb (diff)
downloadorg.eclipse.cdt-200911161214.tar.gz
org.eclipse.cdt-200911161214.tar.xz
org.eclipse.cdt-200911161214.zip
Bug 295194 - [C99 Parser] class cast exception when parsing KnR syntaxv200911161214
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/c99/C99BuildASTParserAction.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/c99/C99BuildASTParserAction.java b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/c99/C99BuildASTParserAction.java
index 65c5c4b702..3fee87f3bf 100644
--- a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/c99/C99BuildASTParserAction.java
+++ b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/c99/C99BuildASTParserAction.java
@@ -651,8 +651,8 @@ public class C99BuildASTParserAction extends BuildASTParserAction {
/**
* function_definition
- * ::= declaration_specifiers <openscope> declarator
- * <openscope> declaration_list compound_statement
+ * ::= declaration_specifiers <openscope-ast> knr_function_declarator
+ * <openscope-ast> declaration_list compound_statement
*/
public void consumeFunctionDefinitionKnR() {
IASTCompoundStatement body = (IASTCompoundStatement) astStack.pop();
@@ -663,7 +663,7 @@ public class C99BuildASTParserAction extends BuildASTParserAction {
ICASTKnRFunctionDeclarator decl = (ICASTKnRFunctionDeclarator) astStack.pop();
astStack.closeScope();
- ICASTSimpleDeclSpecifier declSpecifier = (ICASTSimpleDeclSpecifier) astStack.pop();
+ ICASTDeclSpecifier declSpecifier = (ICASTDeclSpecifier) astStack.pop();
decl.setParameterDeclarations(declarations);
// re-compute the length of the declaration to take the parameter declarations into account

Back to the top