From: Thomas Demmer Newsgroups: comp.os.msdos.djgpp Subject: Re: hello world Date: Thu, 13 Feb 1997 08:47:14 +0100 Organization: Lehrstuhl fuer Stroemungsmechanik Lines: 40 Message-ID: <3302C702.15FB@LSTM.Ruhr-UNI-Bochum.De> References: <5draph$fhk$2 AT thor DOT atcon DOT com> <33020EB6 DOT 660F AT rt DOT e-technik DOT th-darmstadt DOT de> NNTP-Posting-Host: bvb.lstm.ruhr-uni-bochum.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Georg v. Wichert wrote: > > Golem wrote: > > > > ugh! i can't beleive i got an error for djgpp when i first ran it!! > > here is my source code, saved as 'hello1.cc': > > main() { > > printf("Hello world!"); > > } > > and when i used the msdos command line: > > gcc -c -Wall hello1.cc > > i get a 'warning: implicit declaration of function 'int printf(...)' > > what the..?? > > THis is not an error, but the compilers very kind way of telling > you to learn to read your C textbooks carefully! [...] Right, but is this not a bug? I thought that the extension .cc makes gcc think it is a C++ program. And under C++ prototypes are required, otherwise an error should be generated (Which is, IMHO, the right punishment for not using prototypes, even in plain C ;-) So, where am I wrong? -- Ciao Tom ************************************************************* * Thomas Demmer * * Lehrstuhl fuer Stroemungsmechanik * * Ruhr-Uni-Bochum * * Universitaetsstr. 150 * * D-44780 Bochum * * Tel: +49 234 700 6434 * * Fax: +49 234 709 4162 * * Voice/Fax Box: +49 2561 91371 2056 * * http://www.lstm.ruhr-uni-bochum.de/~demmer * *************************************************************