Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!caen!ox.com!math.fu-berlin.de!unidui!unido!rwthinf!marvin.e17.physik.tu-muenchen.de!berg From: berg@marvin.e17.physik.tu-muenchen.de (Stephen R. van den Berg) Newsgroups: comp.lang.c Subject: Re: casting void pointers Message-ID: <4256@rwthinf.UUCP> Date: 23 Apr 91 09:47:18 GMT References: <3121@enuxha.eas.asu.edu> Sender: news@rwthinf.UUCP Lines: 12 Roger A. Hurwitz writes: >Even K&R 2d states that an explicit cast should be used with malloc(), >in another part of the book (p. 142), but I am having trouble reconciling >that with the above language. malloc does not need the cast, any compiler complaining about that is braindamaged (or not ANSI compliant :-) -- Sincerely, berg@marvin.e17.physik.tu-muenchen.de Stephen R. van den Berg. "I code it in 5 min, optimize it in 90 min, because it's so well optimized: it runs in only 5 min. Actually, most of the time I optimize programs."