From: Christoph Mallon Date: Thu, 21 Aug 2008 20:54:18 +0000 (+0000) Subject: Fix for inline assembler: According to the GCC documentation an 'asm' instruction... X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=4ad107b0574daacb446f5af330cd7ea37be9fb41;p=cparser Fix for inline assembler: According to the GCC documentation an 'asm' instruction without any output operands will be treated identically to a volatile 'asm' instruction. [r21330] --- diff --git a/parser.c b/parser.c index d3912f0..8c1a0c3 100644 --- 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();