Documentation: move support for old compilers to CodingGuidelines

The "Try to be nice to older C compilers" text is clearly a guideline
to be borne in mind whilst coding rather than when submitting patches.

Signed-off-by: Adam Spiers <git@adamspiers.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Adam Spiers
2012-12-16 19:36:00 +00:00
committed by Junio C Hamano
parent 6a5b649883
commit a26fd033af
2 changed files with 8 additions and 13 deletions

View File

@ -112,6 +112,14 @@ For C programs:
- We try to keep to at most 80 characters per line.
- We try to support a wide range of C compilers to compile git with,
including old ones. That means that you should not use C99
initializers, even if a lot of compilers grok it.
- Variables have to be declared at the beginning of the block.
- NULL pointers shall be written as NULL, not as 0.
- When declaring pointers, the star sides with the variable
name, i.e. "char *string", not "char* string" or
"char * string". This makes it easier to understand code