Is this legal ANSI?
Henry Spencer
henry at zoo.toronto.edu
Wed Jan 16 03:16:39 AEST 1991
In article <1991Jan14.225620.9974 at demott.com> kdq at demott.com (Kevin D. Quitt) writes:
> Microsoft C 6.0 accepts:
>struct master_log_entry
> {
> struct log_entry le;
> union
> {
> struct gas_log_entry gle;
> ...
> };
> };
>
> mle.gle.<reference to inside of gas_log_entry struct>
> ...
>
> without a complaint. Am I just lucky?
Yes. Nameless members are illegal in ANSI C (except for the special case
of nameless bitfields). Some compilers support this as an extension.
--
If the Space Shuttle was the answer, | Henry Spencer at U of Toronto Zoology
what was the question? | henry at zoo.toronto.edu utzoo!henry
More information about the Comp.lang.c
mailing list