Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!brutus.cs.uiuc.edu!psuvax1!husc6!spdcc!ima!haddock!karl From: karl@haddock.ima.isc.com (Karl Heuer) Newsgroups: comp.lang.c Subject: Re: Structures Message-ID: <16080@haddock.ima.isc.com> Date: 3 Mar 90 02:42:54 GMT References: <14302@reed.UUCP> <1990Mar2.171407.1194@utzoo.uucp> Reply-To: karl@haddock.ima.isc.com (Karl Heuer) Organization: Interactive Systems, Cambridge, MA 02138-5302 Lines: 13 In article <1990Mar2.171407.1194@utzoo.uucp> henry@utzoo.uucp (Henry Spencer) writes: >In article <14302@reed.UUCP> minar@reed.bitnet (Nelson Minar) writes: >>Why does Turbo C have an 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@ima.ima.isc.com or harvard!ima!karl), The Walking Lint