|
|
|
|
|
by RamiK
4502 days ago
|
|
Extensions don't break standard compliance so I didn't bring them up. Note that both C++ and GNU C have similar extensions but under different semantics which don't make them any less ANSI compliant. BTW, be careful around those documents. The assembler, compiler, parser and linker have seen over two decades worth of work since those were put ink to paper. Though admittedly I haven't read through the lib9 source tree in years... |
|
Sure they do, by definition code that uses the extensions is not standards compliant. Plan 9 C code makes heavy use of Plan 9 extensions. The Go runtime also makes use of those extensions, that's why gcc recently (2009) implemented -fplan9-extensions in order for gccgo to compile the Go standard library.
> Note that both C++ and GNU C have similar extensions but under different semantics which don't make them any less ANSI compliant.
I think what you mean is that GNU C is a strict superset of ANSI C and you assume that Plan 9 C is the same. This assumption is wrong. Plan 9 C is not a superset of ANSI C, some ANSI C things are missing; e.g. const. That being said it's not that hard to compile C89 code with the Plan 9 C compilers.
> be careful around those documents. The assembler, compiler, parser and linker have seen over two decades worth of work since those were put ink to paper.
I should know since I use Plan 9 every day and I recently ported the Go toolchain to Solaris and gave a talk on these tools. The compiler document is very accurate, the only glaring anachronism is that the extern register storage class doesn't necessarily use a register in the Go toolchain, but depends on the target operating system. It's still true on Plan 9 though. The assembly guide is more inaccurate, but the C papers are accurate, at least for now.