diff --git a/core/org.eclipse.cdt.core.tests/resources/rewrite/ASTWriterDeclarationTestSource.awts b/core/org.eclipse.cdt.core.tests/resources/rewrite/ASTWriterDeclarationTestSource.awts index e15e59ece6f..cc6ec95b5a8 100644 --- a/core/org.eclipse.cdt.core.tests/resources/rewrite/ASTWriterDeclarationTestSource.awts +++ b/core/org.eclipse.cdt.core.tests/resources/rewrite/ASTWriterDeclarationTestSource.awts @@ -2,6 +2,10 @@ //%CPP asm("movl %1, %%eax;"); +//!GNUExtendedASMDeclarationTest +//%CPP GNU +asm("bswap %0" : "+r" (_data)); + //!FunctionDefinitionTest //%CPP int foo() diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/AbstractGNUSourceCodeParser.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/AbstractGNUSourceCodeParser.java index 58e28e2f276..9b7b8232643 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/AbstractGNUSourceCodeParser.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/AbstractGNUSourceCodeParser.java @@ -1927,16 +1927,13 @@ public abstract class AbstractGNUSourceCodeParser implements ISourceCodeParser { break; case IToken.tEOC: throw new EndOfFileException(t.getOffset()); - - default: - if (content != null) { - if (needspace) { - content.append(' '); - } - content.append(t.getCharImage()); - needspace = true; + } + if (open > 0 && content != null) { + if (needspace) { + content.append(' '); } - break; + content.append(t.getCharImage()); + needspace = true; } } return t;