"Numerical Recipes in C" is nonportable code
Doug Gwyn
gwyn at smoke.ARPA
Fri Sep 9 16:57:47 AEST 1988
In article <1429 at ficc.uu.net> peter at ficc.uu.net (Peter da Silva) writes:
>What's to stop you from doing the following:
> Generate code in an array.
> Jump to the beginning of the array. *
>... I can't see how you could write a valid 'C' compiler that wouldn't
>let you violate this protection.
That's simple. All the compiler has to do is detect any attempt to
use a data object as a function. The only way to even attempt this in
standard C is via an explicit cast to a function pointer somewhere,
which is where the compiler would enforce the constraint.
More information about the Comp.lang.c
mailing list