Community
Participate
Working Groups
Following declaration causes code formatter to fail with an exception: typedef struct __attribute__((aligned(8))) { unsigned int l, a; } LA32; Exception stack trace: org.eclipse.cdt.internal.formatter.AbortFormatting: [22/1] Unexpected token type, expecting:12, actual:Token type=1 image =__attribute__ offset=895 at org.eclipse.cdt.internal.formatter.Scribe.printNextToken(Scribe.java:1623) at org.eclipse.cdt.internal.formatter.CodeFormatterVisitor.formatOpeningBrace(CodeFormatterVisitor.java:3984) at org.eclipse.cdt.internal.formatter.CodeFormatterVisitor.visit(CodeFormatterVisitor.java:1872) at org.eclipse.cdt.internal.formatter.CodeFormatterVisitor.visit(CodeFormatterVisitor.java:851) at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTCompositeTypeSpecifier.accept(CPPASTCompositeTypeSpecifier.java:155) ... Attached to the bug is a lazy formatter fix - it will simply skip everything until the opening brace is found.
I can't reproduce the exception. The resut of the formatting may be a bit strange: typedef struct __attribute__((aligned(8))) { unsigned int l, a; } LA32; but I believe that's covered by bug 467346.
Closing per comment 1. Feel free to reopen if you're still seeing this.