Structures

Karl Heuer karl at haddock.ima.isc.com
Sat Mar 3 13:42:54 AEST 1990


In article <1990Mar2.171407.1194 at utzoo.uucp> henry at utzoo.uucp (Henry Spencer) writes:
>In article <14302 at reed.UUCP> minar at reed.bitnet (Nelson Minar) writes:
>>Why does Turbo C have an <optional> warning "Warning: structure passed by
>>value" if it is legal TC 2.0 code?  Because it is potentially non-portable?
>
>It's standard behavior for modern compilers; the warning is probably
>because it's not K&R1 conformant.

I think it's more likely that the warning exists simply to catch a common
mistake.  How often do you actually pass a struct by value on purpose,
compared to the number of times you accidentally forget to enreference it?

Karl W. Z. Heuer (karl at ima.ima.isc.com or harvard!ima!karl), The Walking Lint



More information about the Comp.lang.c mailing list