Re: Simplicity has a future
- From: Ian Collins <ian-news@xxxxxxxxxxx>
- Date: Wed, 31 May 2006 21:15:21 +1200
Richard Heathfield wrote:
Ian Collins said:One good reason for passing C though a C++ compiler:
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.
"/tmp/x.c", line 16: Error: Cannot use const char[82] to initialize
char[81].
--
Ian Collins.
.
- Follow-Ups:
- Re: Simplicity has a future
- From: Richard Heathfield
- Re: Simplicity has a future
- References:
- Simplicity has a future
- From: jacob navia
- Re: Simplicity has a future
- From: Tomás
- Re: Simplicity has a future
- From: jacob navia
- Re: Simplicity has a future
- From: Tomás
- Re: Simplicity has a future
- From: Keith Thompson
- Re: Simplicity has a future
- From: Tomás
- Re: Simplicity has a future
- From: Richard Heathfield
- Re: Simplicity has a future
- From: Harald van Dijk
- Re: Simplicity has a future
- From: Ian Collins
- Re: Simplicity has a future
- From: Richard Heathfield
- Simplicity has a future
- Prev by Date: Re: Simplicity has a future
- Next by Date: Re: Simplicity has a future
- Previous by thread: Re: Simplicity has a future
- Next by thread: Re: Simplicity has a future
- Index(es):
Relevant Pages
|