www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/04/24/09:30:21

From: mert0407 AT sable DOT ox DOT ac DOT uk (George Foot)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: 2 include || !2include
Date: 24 Apr 1997 11:45:52 GMT
Organization: Oxford University, England
Lines: 22
Message-ID: <5jnh5g$2rv@news.ox.ac.uk>
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: sable.ox.ac.uk
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Michael Flegel (FLEGEL AT physnet DOT uni-hamburg DOT de) wrote:

: I've just been wondering: I use printf and exit and all those fancy 
: commands :-), which I used to have to include stdlib.h and conio.h and 
: stuff in my old BC3.1, 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. 
: I can live with that, but it makes me a little edgy, not to know where my 
: stuff comes from. So I'd appreciate an explanation from anyone who knows. 
: (Maybe it had something to do wit the  fact that I link it as a C and not 
: C++ program... don'T know)

I don't really use C much, but I think compiling with `-Wall' should warn
you about implicit declarations of functions. In C it will still link the
program, whereas in C++ it would complain that there was no exact match
for the (implicit) prototype. If you put `-Werror' on the command line
too, gcc will return an error code if it produces any warnings, halting
make/RHIDE/whatever you're using.

-- 
George Foot <mert0407 AT sable DOT ox DOT ac DOT uk>
Merton College, Oxford

- Raw text -


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