Is this a bug in some C compilers?

Doug Gwyn gwyn at smoke.BRL.MIL
Wed Aug 16 02:13:48 AEST 1989


In article <800 at sbsvax.UUCP> greim at sbsvax.UUCP (Michael Greim) writes:
>Am I correct to say that the program is not correct C, and that all compilers
>which compile it are wrong?

Certainly it's not correct C.

For reasons that we've recently discussed, older compilers were rather
cavalier about structure members.  If the programmer wanted to insist
on treating non-structs (or the wrong kind of structs) as having certain
members, the compiler would attempt to comply.

A standard-conforming compiler is required to diagnose such misusage.



More information about the Comp.lang.c mailing list