Fix for inline assembler: According to the GCC documentation an 'asm' instruction...
authorChristoph Mallon <christoph.mallon@gmx.de>
Thu, 21 Aug 2008 20:54:18 +0000 (20:54 +0000)
committerChristoph Mallon <christoph.mallon@gmx.de>
Thu, 21 Aug 2008 20:54:18 +0000 (20:54 +0000)
[r21330]

parser.c

index d3912f0..8c1a0c3 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -7596,6 +7596,13 @@ end_of_asm:
        rem_anchor_token(')');
        expect(')');
        expect(';');
+
+       if (asm_statement->outputs == NULL) {
+               /* GCC: An 'asm' instruction without any output operands will be treated
+                * identically to a volatile 'asm' instruction. */
+               asm_statement->is_volatile = true;
+       }
+
        return statement;
 end_error:
        return create_invalid_statement();