The '''GNU codingCoding standardsStandards''' are a set of rules and guidelines for writing [[computer program|program]]s that work consistently within the [[GNU]] system. The GNU Coding Standards were written by [[Richard Stallman]] and other GNU Project volunteers. The standards document is part of the [[GNU Project]] and is available from the GNU website [http://www.gnu.org/prep/standards/]. Though it focuses on writing [[free software]] for GNU in [[C (programming language)|C]], much of it can be applied more generally. In particular, the GNU Project encourages its contributors to always try to follow the standards—whether or not their programs are implemented in C. The C code formatting style is well-known within the [[free software community]], but of course anyone can choose to follow it.
== Code formatting ==
The GNU codingCoding standardsStandards specify exactly how to format most [[C (programming language)|C programming language]] constructs. Here is a characteristic example:
<source lang="c">
Line 64:
== Portability ==
The GNU codingCoding standardsStandards define the issue of portability in this way: portability in the [[Unix]] world means 'between Unixes'; in a GNU program this kind of portability is desirable, but not vitally important.
According to the standard, portability problems are very limited as GNU programs are designed to be compiled with one compiler, the [[GNU Compiler Collection|GNU C Compiler]], and only run on one system, which is the GNU system.