__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.
This commit is contained in:
seyko
2016-05-01 22:38:38 +03:00
parent 09a78412f0
commit 6afe668ec7
3 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,7 @@
extern void vide(void);
__asm__("vide: ret");
int main() {
vide();
return 0;
}