Mail Archives: djgpp/1997/02/13/07:45:58
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 *
*************************************************************
- Raw text -