Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84 SMI; site sun.uucp Path: utzoo!linus!philabs!cmcl2!seismo!harvard!talcott!panda!genrad!decvax!decwrl!sun!guy From: guy@sun.uucp (Guy Harris) Newsgroups: net.lang.c Subject: Re: Dumb question on dyn. mem. alloc (if(hate(novices)) dont_read();) Message-ID: <2462@sun.uucp> Date: Sun, 21-Jul-85 17:50:04 EDT Article-I.D.: sun.2462 Posted: Sun Jul 21 17:50:04 1985 Date-Received: Wed, 24-Jul-85 06:28:46 EDT References: <1035@homxa.UUCP> <921@umcp-cs.UUCP> Organization: Sun Microsystems, Inc. Lines: 15 > Lint doesn't realize that malloc and calloc have been written such > that that "possible pointer alignment problem" never occurs. The > thing to do is ignore the message (or teach lint how to say that > a function returns a ``very aligned'' pointer; someone once suggested > using /*ALIGNOK*/ similar to the way /*NOTREACHED*/ and /*ARGSUSED*/ > tell lint not to complain). Hopefully, pointers of the ANSI C type "void *" will be able to be assigned to any other pointer type without any complaints, including complaints about possible alignment problems. This is, of course, a horribly large loophole, but there may be some small hope that people won't abuse it and will always write routines like "malloc" which return "void *" values to align the object pointed to so that it can, indeed, be used to point to anything. Guy Harris