"It's pronounced 'volatile pointer to tvbuff_t' but it's spelled
authorGuy Harris <guy@alum.mit.edu>
Mon, 13 Nov 2000 05:11:16 +0000 (05:11 -0000)
committerGuy Harris <guy@alum.mit.edu>
Mon, 13 Nov 2000 05:11:16 +0000 (05:11 -0000)
commitf9546764f0f61841505cf631f0d9386457190179
treedd7257193e831067f68e46fabd4461b2f6a09a68
parent5dd5670f42ae5baed1335994757d27851e49141f
"It's pronounced 'volatile pointer to tvbuff_t' but it's spelled
'tvbuff_t *volatile'."  Makes "Throat-Warbler Mangrove" vs.
"Luxury-Yacht" sound almost normal....

Type-qualified pointers to non-type-qualified objects are a barrel of
fun in C.  The way you declare a volatile pointer named "bar" to a
*non-volatile* "foo" is

foo *volatile bar;

as opposed to a non-volatile pointer "bar" to a volatile "foo", which is

volatile foo *bar;

GCC's complaint about variables being clobbered by longjmp refers to the
fact that "longjmp()" isn't guaranteed to restore variables stored in
registers to the values they had at the time of the "longjmp()" (if
"setjmp()" stuffs the current register values in the "jmp_buf", and
"longjmp()" just reloads them rather than walking the stack to restore
all register values pushed onto the stack, the values at the time of the
"setjmp()" will be restored, clobbering any updates done after the
"setjmp()"); the workaround provided in ANSI C is to declare the
variables in question "volatile", which will keep them out of registers
(or any other place that "setjmp()"/"longjmp()" can't handle).

svn path=/trunk/; revision=2631
packet-eth.c
packet-tr.c