a (bad) use for &LABEL
John Gilmore
gnu at sun.uucp
Thu Oct 4 17:05:30 AEST 1984
Here at Sun we used to write a fair bit of C code with intermixed
assembler code, interrupts jumping into the middle of compiler produced
code, etc. We stopped doing that because we kept getting burned by
compiler changes -- and rightly so. The compiler is entitled to make a
lot of assumptions about its environment that JUST AREN'T TRUE if you
are intermixing random non-compiler-generated code or threads-of-control.
The compiler can often generate better code by making MORE such assumptions
as it evolves.
If you really can't stomach writing your low level interrupt handler in
assembler, try inserting
; /* Null statement often useful here */
#asm
interruptlabel:
#endasm
or
;
asm("interruptlabel:");
whichever your compiler prefers. Then, once it works, don't buy any
newer releases of the compiler.
More information about the Comp.lang.c
mailing list