Auto variable with sizeof == 0
gwyn at brl-smoke.UUCP
gwyn at brl-smoke.UUCP
Sat Feb 14 06:41:08 AEST 1987
In article <795 at cullvax.UUCP> drw at cullvax.UUCP (Dale Worley) writes:
-braner at batcomputer.tn.cornell.edu (braner) writes:
-> typedef struct LINE {
->...
-> char text[]; /* !!!!!!!!! */
-> } LINE;
-Replace "char text[]" with "char text[0]".
Since X3J11 hasn't agreed to permit 0-sized objects anywhere,
you might be better off using "char text[1]". Turn off any
range-checking your C system might have.
More information about the Comp.lang.c
mailing list