cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/13/07:45:58

From: Thomas Demmer <demmer AT LSTM DOT Ruhr-UNI-Bochum DOT De>
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
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                *
*************************************************************

- Raw text -


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