(char *)(-1)
Alan J Rosenthal
flaps at dgp.toronto.edu
Sat Aug 5 02:21:00 AEST 1989
pardo at june.cs.washington.edu (David Keppel) writes:
> char const magic_1 = 'j';
> static char const terminator[] = "unk";
> #define MAGIC_1 (&magic_1)
>
>Then `return (MAGIC_1);'. *If* the implementation gives you
>contiguous layout, then dereferencing `MAGIC_1' will give you `junk'...
Of course, there is a way to request contiguous layout in C:
char magic_1[] = "junk";
#define MAGIC_1 magic_1
More information about the Comp.std.c
mailing list