Path: utzoo!attcan!uunet!snorkelwacker!mintaka!spdcc!ima!haddock!karl From: karl@haddock.ima.isc.com (Karl Heuer) Newsgroups: comp.lang.c Subject: Re: FAQ - malloc array - clarify Keywords: malloc, Sun, lint Message-ID: <18032@haddock.ima.isc.com> Date: 14 Sep 90 23:41:00 GMT References: <8056@helios.TAMU.EDU> <1990Sep08.022034.8444@virtech.uucp> <1803@tuvie> <1990Sep11.002544.9151@virtech.uucp> <1806@tuvie> <15495@drilex.UUCP> Reply-To: karl@kelp.ima.isc.com (Karl Heuer) Organization: Interactive Systems, Cambridge, MA 02138-5302 Lines: 13 In article <15495@drilex.UUCP> dricejb@drilex.UUCP (Craig Jackson drilex1) writes: >People here have been blathering on about broken compilers, erroneous lint >libraries, etc, thinking that 'sizeof()' is returning an int on that machine. > >Wouldn't a more reasonable explanation be that 'ncols' is an int, and that >particular compiler treats 'int * unsigned' as 'int' (or 'long int')? There is a well-known implementation where sizeof() returns a signed int. (Understandable, since K&R 1 didn't say.) I've never heard of one that thinks int*uint is signed. (Which would be harder to defend, since both Classic and ANSI C agree that it isn't.) Karl W. Z. Heuer (karl@kelp.ima.isc.com or ima!kelp!karl), The Walking Lint