TIP: Click on subject to list as thread! ANSI
echo: cis.languages
to: Bob van der Poel, 76510,2203 (X)
from: Mark Griffith 76070,41
date: 1992-08-25 13:20:48
subject: #Your July article

#: 16294 S3/Languages
    25-Aug-92  13:20:48
Sb: #Your July article
Fm: Mark Griffith 76070,41
To: Bob van der Poel, 76510,2203 (X)

Bob,

I take exception to something you say in your article in the July Issue of the
OS9 Underground.  In there, you list a header file that defines the malloc(),
calloc(), and several other functions dealing with memory management as 'void
*malloc', 'void *calloc', etc.

This is completely contrary to the ANSI and K&R standards.  These functions do
indeed return a value, namely a pointer.  To define them as type void is not
only dangerous to the program development since it will cause the compiler to
leave items on the stack, but it is especially poor when used in an article
that proports to be a 'teaching' series.

I see you mention you do this to keep the compiler happy when you assing
..errr...assign any form of return value to a pointer.  I know of no need to
ever do this, and have never seen this feature (or bug' documented any where.

I think a retraction and correction in the next article is in order.

Mark

There is 1 Reply.

SOURCE: compuserve via textfiles.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.