From 6afe668ec7a11736a9418a46370af89a8c657ee8 Mon Sep 17 00:00:00 2001 From: seyko Date: Sun, 1 May 2016 22:38:38 +0300 Subject: __asm__() outside function gcc/pcc allow __asm__() outside a function body: extern void vide(void); __asm__("vide: ret"); There is many such code in the Linux kernels. --- tests/tests2/85-asm-outside-function.c | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 tests/tests2/85-asm-outside-function.c (limited to 'tests/tests2/85-asm-outside-function.c') diff --git a/tests/tests2/85-asm-outside-function.c b/tests/tests2/85-asm-outside-function.c new file mode 100644 index 0000000..0aa7e33 --- /dev/null +++ b/tests/tests2/85-asm-outside-function.c @@ -0,0 +1,7 @@ +extern void vide(void); +__asm__("vide: ret"); + +int main() { + vide(); + return 0; +} -- cgit v1.3.1