Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Kucera2009-11-15 21:27:59 -0500
committerMike Kucera2009-11-15 21:27:59 -0500
commit760126e88305374a42e237ad7d9b58ad85f975b8 (patch)
tree9634981bcf6d752e1d144540eee8f6f0ee26239f /lrparser
parentc60f642aa88286bdbe5a9c10dd5d1910853b4507 (diff)
downloadorg.eclipse.cdt-760126e88305374a42e237ad7d9b58ad85f975b8.tar.gz
org.eclipse.cdt-760126e88305374a42e237ad7d9b58ad85f975b8.tar.xz
org.eclipse.cdt-760126e88305374a42e237ad7d9b58ad85f975b8.zip
Bug 295194 - [C99 Parser] class cast exception when parsing KnR syntax
Diffstat (limited to 'lrparser')
-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 a562bfe49b..698b16a457 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
@@ -652,8 +652,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();
@@ -664,7 +664,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