www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/04/24/16:02:57

From: Erik Max Francis <max AT alcyone DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: 2 include || !2include
Date: Thu, 24 Apr 1997 09:36:36 -0700
Organization: Alcyone Systems
Lines: 25
Message-ID: <335F8C14.21DBD987@alcyone.com>
References: <Pine DOT VMS DOT 3 DOT 91-b11-vms DOT 970424125917 DOT 867B-100000 AT sat111 DOT physnet DOT uni-hamburg DOT de>
NNTP-Posting-Host: newton.alcyone.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Michael Flegel wrote:

> Now that I use DJGPP, I compile and link my little
> "hello world" proggy using printf, getch and uhhh, nothing else, but I
> don'T have to include any header files.

Just because it allows you to does not mean it is strictly conforming.  It
is bad ANSI C to not #include the appropriate system headers when using
standard library calls.

For more complicated functions, you will start to get all kinds of weird
warnings based on the fact that the compiler, not knowing the prototypes
for the functions you're using, makes incorrect assumptions.

In fact there are several compilers (one of them was Turbo C) which will
start to have severe problems which are very hard to find if you use
malloc/free and forged to #include <stdlib.h>.

-- 
       Erik Max Francis, &tSftDotIotE / email / max AT alcyone DOT com
                     Alcyone Systems /   web / http://www.alcyone.com/max/
San Jose, California, United States /  icbm / 37 20 07 N  121 53 38 W
                                   \
                      "The future / is right there."
                                 / Bill Moyers

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019