Is typedef char BUFFER[20] legal?

Henry Spencer henry at zoo.toronto.edu
Sun Feb 3 11:01:28 AEST 1991


In article <22642 at netcom.UUCP> avery at netcom.UUCP (Avery Colter) writes:
>My instinct right now is telling me that 
>
>typedef char[20] BUFFER
>
>is more consistent...

Nope, syntax error.  Typedef is semantically a special case, but not
syntactically:  a type declaration looks *exactly* like a declaration
of an ordinary variable except for that funny word "typedef" on the
front.
-- 
"Maybe we should tell the truth?"      | Henry Spencer at U of Toronto Zoology
"Surely we aren't that desperate yet." |  henry at zoo.toronto.edu   utzoo!henry



More information about the Comp.lang.c mailing list