* Re: [9fans] C99
@ 2001-02-27 13:12 Russ Cox
0 siblings, 0 replies; 10+ messages in thread
From: Russ Cox @ 2001-02-27 13:12 UTC (permalink / raw)
To: 9fans
Is there any plan to update ape/cc to be C99 compliant?
Only the obvious one.
Russ
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [9fans] C99
2006-10-04 18:34 Joel “chesky” Salomon
@ 2006-10-04 19:24 ` erik quanstrom
0 siblings, 0 replies; 10+ messages in thread
From: erik quanstrom @ 2006-10-04 19:24 UTC (permalink / raw)
To: 9fans
can you give an example? this works me. e.g.
{
int x;
x = 1;
int y;
y = 1;
print("%d\n", x+y);
}
or
for(int x = 1; x < max; x++)
;
- erik
^ permalink raw reply [flat|nested] 10+ messages in thread
* [9fans] C99
@ 2006-10-04 18:34 Joel “chesky” Salomon
2006-10-04 19:24 ` erik quanstrom
0 siblings, 1 reply; 10+ messages in thread
From: Joel âcheskyâ Salomon @ 2006-10-04 18:34 UTC (permalink / raw)
To: 9fans
According to /sys/src/cmd/cc/c99, among the C99 features implemented in 8c et al is:
12. Allow declarations anywhere.
Is there a switch to turn that option on? I recall getting a compile error when I’ve tried that.
--Joel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [9fans] C99
2001-02-27 14:25 Russ Cox
@ 2001-02-28 9:30 ` Douglas A. Gwyn
0 siblings, 0 replies; 10+ messages in thread
From: Douglas A. Gwyn @ 2001-02-28 9:30 UTC (permalink / raw)
To: 9fans
Russ Cox wrote:
> http://www.dkuug.dk/JTC1/SC22/WG14/www/docs/n843.ps.gz
That's not an accurate copy of the 1999 C standard.
Jack Klein just posted information in comp.lang.c.moderated
about obtaining a correct copy.
There are several sources for a summary of the main changes
from C89 to C99, e.g.
http://web.onetelnet.ch/~twolf/tw/c/c9x_changes.html
The preprocessor extensions are easy enough to implement,
except possibly for the variable-number-of-arguments facility.
Several of the extensions to the language proper are either
already in Plan 9's compiler (compound literals, designated
initializers) or else are straightforward to add. Variable-length
arrays might be harder.
Most of the library extensions are straightforward to add.
For a start at providing some C99 standard library facilities,
e.g. <stdbool.h> and <stdint.h>, see
http://www.lysator.liu.se/c/q8/index.html
The most difficult one is undoubtedly <tgmath.h>, which
requires compiler support.
My opinion as a long-time implementor and maintainer of C
environments is that *most* of the changes from C89 to C99
can be implemented merely by taking the time to do it,
without having to think very hard, and just a few features
require special care (VLAs, <tgmath.h>). Until C99 conforming
implementations reach the marketplace and start to be used,
there won't be any demand for the new features. That means
in probably another year or two it would be useful to have C99
support ready.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [9fans] C99
@ 2001-02-28 2:51 okamoto
0 siblings, 0 replies; 10+ messages in thread
From: okamoto @ 2001-02-28 2:51 UTC (permalink / raw)
To: 9fans
[-- Attachment #1: Type: text/plain, Size: 285 bytes --]
>http://www.dkuug.dk/JTC1/SC22/WG14/www/docs/n843.ps.gz
I tried this, and found why many Japanese programmers insist "main
must return int". :-) The locale.h would also be very nice to someone
else who dont' want to accept unicode. Anyway, what's the hell of this?
Kenji
[-- Attachment #2: Type: message/rfc822, Size: 1537 bytes --]
From: "Russ Cox" <rsc@plan9.bell-labs.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] C99
Date: Tue, 27 Feb 2001 09:25:40 -0500
Message-ID: <20010227142543.C81F2199EE@mail.cse.psu.edu>
http://www.dkuug.dk/JTC1/SC22/WG14/www/docs/n843.ps.gz
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [9fans] C99
@ 2001-02-27 14:27 forsyth
0 siblings, 0 replies; 10+ messages in thread
From: forsyth @ 2001-02-27 14:27 UTC (permalink / raw)
To: 9fans
[-- Attachment #1: Type: text/plain, Size: 56 bytes --]
what have they done this time, just out of interest?
[-- Attachment #2: Type: message/rfc822, Size: 1702 bytes --]
To: cse.psu.edu!9fans
Subject: [9fans] C99
Date: Tue, 27 Feb 2001 10:43:32 GMT
Message-ID: <3A9B3DFA.6DF08D44@hotmail.com>
Is there any plan to update ape/cc to be C99 compliant?
david
--
FORTRAN was the language of choice
for the same reason that three-legged races are popular.
-- Ken Thompson, "Reflections on Trusting Trust"
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [9fans] C99
@ 2001-02-27 14:25 Russ Cox
2001-02-28 9:30 ` Douglas A. Gwyn
0 siblings, 1 reply; 10+ messages in thread
From: Russ Cox @ 2001-02-27 14:25 UTC (permalink / raw)
To: 9fans
http://www.dkuug.dk/JTC1/SC22/WG14/www/docs/n843.ps.gz
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [9fans] C99
@ 2001-02-27 13:19 Russ Cox
0 siblings, 0 replies; 10+ messages in thread
From: Russ Cox @ 2001-02-27 13:19 UTC (permalink / raw)
To: 9fans
Is there any plan to update ape/cc to be C99 compliant?
Whoops. I misread this, thinking it said "way" not "plan".
A slightly helpful answer: I printed the spec and got _very_
scared away. In my cynical view, it's not clear how much
good it would do anyway. The even larger can of worms is the
Single Unix spec. I doubt the number of exactly conforming
C99/SUSV programs is much higher than the number of exactly
conforming ANSI/POSIX programs currently in existence.
A few weeks ago, I rewrote u9fs with the Single Unix spec
in hand, so that it would just compile everywhere without
any changes whatsoever. But it was not to be. As usual,
vendors' implementations vary in subtle ways so that we're
still not at "write once, compile & run anywhere" in any
real sense.
Russ
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [9fans] C99
@ 2001-02-27 13:18 rob pike
0 siblings, 0 replies; 10+ messages in thread
From: rob pike @ 2001-02-27 13:18 UTC (permalink / raw)
To: 9fans
Is there any plan to update ape/cc to be C99 compliant?
Russ is being a little opaque. There is no plan to update the
compilers, but there's no plan not to update, either.
-rob
^ permalink raw reply [flat|nested] 10+ messages in thread
* [9fans] C99
@ 2001-02-27 10:43 David Rubin
0 siblings, 0 replies; 10+ messages in thread
From: David Rubin @ 2001-02-27 10:43 UTC (permalink / raw)
To: 9fans
Is there any plan to update ape/cc to be C99 compliant?
david
--
FORTRAN was the language of choice
for the same reason that three-legged races are popular.
-- Ken Thompson, "Reflections on Trusting Trust"
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2006-10-04 19:24 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-27 13:12 [9fans] C99 Russ Cox
-- strict thread matches above, loose matches on Subject: below --
2006-10-04 18:34 Joel “chesky” Salomon
2006-10-04 19:24 ` erik quanstrom
2001-02-28 2:51 okamoto
2001-02-27 14:27 forsyth
2001-02-27 14:25 Russ Cox
2001-02-28 9:30 ` Douglas A. Gwyn
2001-02-27 13:19 Russ Cox
2001-02-27 13:18 rob pike
2001-02-27 10:43 David Rubin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).