clang-1/test/Sema/asm.c

15 строки
352 B
C
Исходник Обычный вид История

// RUN: clang %s -verify -fsyntax-only
void
f()
{
int i;
asm ("foo\n" : : "a" (i + 2));
asm ("foo\n" : : "a" (f())); // expected-error {{invalid type 'void' in asm input}}
asm ("foo\n" : "=a" (f())); // expected-error {{invalid lvalue in asm output}}
asm ("foo\n" : "=a" (i + 2)); // expected-error {{invalid lvalue in asm output}}
}