typedef gripe
Guy Harris
guy at rlgvax.UUCP
Sat Oct 6 17:02:53 AEST 1984
>...> Discussion of "jmp_buf" typedefed as an array causing various
>...> compilation errors.
>
> Apollo is correct and Berkeley is wrong at least as I understand how C
> compilers work at ATT. A jmp_buf is not exactly an array. It is a
> fixed length, array, i. e. a block of memory of known size a.k.a
> structure.
Not as of System V Release 2; it's still an array, not a structure, in the
include file "setjmp.h". Thus, the example you give later of structure
copying between "jmp_buf"s won't work either. Maybe some non-mainstream
versions of UNIX have defined it as a structure (it probably should be so
defined, 1) because it doesn't do any harm, 2) because structures, unlike
arrays, can be dealt with in a semi-abstract fashion and won't cause problems
when you stick an "&" in front of one's name, and 3) because that way you
can put mnemonic names on the elements of the jmp_buf, so you can figure out
"OK, it sticks the current frame pointer in the fifth word").
Guy Harris
{seismo,ihnp4,allegra}!rlgvax!guy
More information about the Comp.lang.c
mailing list