Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!spdcc!ima!haddock!karl From: karl@haddock.ima.isc.com (Karl Heuer) Newsgroups: comp.lang.c Subject: Re: lint on malloc calls Keywords: lint, malloc, alignment Message-ID: <7592@haddock.ima.isc.com> Date: 16 Sep 88 23:47:20 GMT References: <39617@linus.UUCP> <9900007@bradley> <216@iaoobelix.UUCP> Reply-To: karl@haddock.ima.isc.com (Karl Heuer) Organization: Interactive Systems, Boston Lines: 17 In article <216@iaoobelix.UUCP> woerz@iaoobelix.UUCP (Dieter Woerz) writes: >> extern void *malloc(); > >This would only help, if you lint library, where malloc is defined, >is changed too for malloc returning void *. But I think lint must be >changed for this one too, as lint must know that a void * will always >be aligned properly. I'm not sure, if the current lint's know this >definition. Since in fact a (void *) pointer is *not* always properly aligned, it's not clear that this would be an appropriate change to make anyway. Better would be to have some other way to specify that malloc() is a special case. I've suggested doing it with a lintpragma: /* ALIGNED */ extern void *malloc(); /* or "char *", if pre-ANSI */ Karl W. Z. Heuer (ima!haddock!karl or karl@haddock.isc.com), The Walking Lint