Re: Simplicity has a future



Ian Collins said:

Harald van D?k wrote:

c.c: In function ?main?:
c.c:17: error: type defaults to ?int? in declaration of ?i?
c.c:20: error: expected ?,? or ?;? before ?)? token
c.c:64: error: implicit declaration of function ?toupper?
c.c:69: error: implicit declaration of function ?tolower?

That's compiling as C, not as C++.

My C compiler gave several screens of errors and warning before giving up.

Try it again, fixing the trivial error on line 20 (for which I apologise).
Any errors you get then will be either because you have managed to dig up a
C99 compiler from somewhere (and I don't claim that the program is valid
C99), or because your compiler is simply issuing diagnostics for the sake
of it. Modulo the linesplice accident, the program is, as far as I'm aware,
a legal C90 program.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
.



Relevant Pages

  • Re: introduction to programming
    ... Location Bar and type `strict' in the filter input. ... I know two extensions that allow you to ... All the efficient scripting languages I've used are what we used to call "compile & go" in the sense that there's no visible compiler. ... PLAN 3 and PLAN 4 were greeted with cheers because they dropped implicit declaration. ...
    (comp.lang.javascript)
  • Re: Simplicity has a future
    ... c.c:64: error: implicit declaration of function ?toupper? ... c.c:69: error: implicit declaration of function ?tolower? ... My C compiler gave several screens of errors and warning before giving up. ... C99 compiler from somewhere (and I don't claim that the program is valid ...
    (comp.lang.c)
  • Re: strcpy warning
    ... >>Consistent indenting will make your programs much easier to read. ... You don't #include libraries. ... This is usually a Bad Thing, since the implicit declaration may not ... compiler or it could be using different default settings. ...
    (comp.lang.c)
  • Re: compiler behaviour, exported symbols, linking
    ... miban() from second module. ... Implicit 'int' was dropped in C99. ... with only implicit declaration warning ... A different C99 compiler (and ...
    (comp.lang.c)
  • Re: Simplicity has a future
    ... c.c:17: error: type defaults to ?int? ... c.c:64: error: implicit declaration of function ?toupper? ... My C compiler gave several screens of errors and warning before giving up. ...
    (comp.lang.c)