delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/27/21:40:18

Message-Id: <199708280137.LAA04520@rabble.uow.edu.au>
Subject: Re: delay() and -Wall
To: DBerry AT dca DOT gov DOT au
Date: Thu, 28 Aug 1997 11:37:28 +1000 (EST)
Cc: djgpp AT delorie DOT com (DJGPP)
In-Reply-To: <0000xnprxnnz.0000wwmsoqmi@dca.gov.au> from "DBerry@dca.gov.au" at "Aug 28, 97 08:40:28 am"
From: *** Brett *** <bporter AT rabble DOT uow DOT edu DOT au>
MIME-Version: 1.0

> 
> I have a program that works fine.  However when I compile it with the -Wall 
> switch I get the following message:
> 
> para.c: In function `main':
> para.c:163: warning: implicit declaration of function `delay' - The 
> statement is just a delay(1000);
>
You haven't included the header that has the prototype for 'delay'.
 
> it still runs ok, and the delay statement works as expected.
>
This is because the compiler makes a "guess" at the prototype and still
links it correctly. If you did this in c++ with its name-mangling you will
more often than not get an error at link time.

I'm not at my own computer so I can't check which header delay is in, but it
is probably stdlib.h. Try looking it up in info, or RHIDE if you have it.

--
Brett Porter
bporter AT rabble DOT uow DOT edu DOT au

http://www.geocities.com/CollegePark/Union/3596
	Humour, Programming, and more.

- Raw text -


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