Community
Participate
Working Groups
In the following program... ========== #include <stdio.h> // Should not be here to create syntax error #include <stdarg.h> int main(void *var[], va_list ap) { int i=0; void *v; for (;;) v = va_arg(ap, void *); //extract statement return 0; } ========== If we remove the inclusion of stdarg.h, then there is a syntax error in the va_arg line. So, then if you try to extract, CDT throws the following exception: [ERROR] org.eclipse.cdt.internal.core.dom.rewrite.astwriter.ProblemRuntimeException at org.eclipse.cdt.internal.core.dom.rewrite.astwriter.StatementWriter.writeStatement(StatementWriter.java:151) at org.eclipse.cdt.internal.core.dom.rewrite.astwriter.ASTWriterVisitor.visit(ASTWriterVisitor.java:189) at org.eclipse.cdt.internal.core.dom.rewrite.changegenerator.ChangeGeneratorWriterVisitor.visit(ChangeGeneratorWriterVisitor.java:334) at org.eclipse.cdt.internal.core.dom.parser.c.CASTProblemStatement.accept(CASTProblemStatement.java:47) at org.eclipse.cdt.internal.core.dom.rewrite.astwriter.StatementWriter.writeCompoundStatement(StatementWriter.java:381) at org.eclipse.cdt.internal.core.dom.rewrite.astwriter.StatementWriter.writeStatement(StatementWriter.java:122) at org.eclipse.cdt.internal.core.dom.rewrite.astwriter.ASTWriterVisitor.visit(ASTWriterVisitor.java:189) When you include the file, the syntax error is resolved, and the refactoring does not have a problem. May be a bug only because the refactoring should not throw an exception.