Topic: GNU coding standards (was: Are all Windows programs ill-formed?)
Author: fjh@munta.cs.mu.OZ.AU (Fergus Henderson)
Date: 1996/02/10 Raw View
[This is starting to drift away from the topic of C++ standardization;
I've cross-posted to gnu.misc.discuss and redirected followups. -fjh.]
kanze@gabi.gabi-soft.fr (J. Kanze) writes:
>Hmmm... I believe in fact that the GNU coding guidelines actually
>encourages you to use GNU extensions in everything but the compiler
>itself (since it has to be compiled with the native C compiler).
No, that's not the case. The GNU standards document says
| Whether to use these extensions in implementing your
| program is a difficult question.
...
| With some extensions, it might be easy to provide both alternatives.
| For example, you can define functions with a "keyword" `INLINE' and
| define that as a macro to expand into either `inline' or nothing,
| depending on the compiler.
|
| In general, perhaps it is best not to use the extensions if you can
| straightforwardly do without them, but to use the extensions if they
| are a big improvement.
It further suggests that widely-used programs such as emacs or compiler
programs such as gcc should not use any extensions at all.
I think this is a reasonable position. I don't think anyone on the C++
standards committee believes that all C++ programs should be strictly
conforming.
The GNU standards document also says that GNU programs should be
upwardly compatible with the relevant ANSI and POSIX standards.
--
Fergus Henderson WWW: http://www.cs.mu.oz.au/~fjh
fjh@cs.mu.oz.au PGP: finger fjh@128.250.37.3
---
[ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu.
Contact address: std-c++-request@ncar.ucar.edu. Moderation policy:
http://reality.sgi.com/employees/austern_mti/std-c++/policy.html. ]