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>
Adam Spiers committed
Dec 16, 2012 at 19:36 UTC
a26fd033af23389cd6e17d078007aaec61b5c9c1
2 files changed
+8
-13
Documentation/CodingGuidelines
+8
@@ -112,6 +112,14 @@ For C programs:
112
113
- We try to keep to at most 80 characters per line.
114
115
+ - We try to support a wide range of C compilers to compile git with,
116
+ including old ones. That means that you should not use C99
117
+ initializers, even if a lot of compilers grok it.
118
+
119
+ - Variables have to be declared at the beginning of the block.
120
+
121
+ - NULL pointers shall be written as NULL, not as 0.
122
+
123
- When declaring pointers, the star sides with the variable
124
name, i.e. "char *string", not "char* string" or
125
"char * string". This makes it easier to understand code
Documentation/SubmittingPatches
-13
@@ -127,19 +127,6 @@ in templates/hooks--pre-commit. To help ensure this does not happen,
127
run git diff --check on your changes before you commit.
128
129
130
-(1a) Try to be nice to older C compilers
131
-
132
-We try to support a wide range of C compilers to compile
133
-git with. That means that you should not use C99 initializers, even
134
-if a lot of compilers grok it.
135
-
136
-Also, variables have to be declared at the beginning of the block
137
-(you can check this with gcc, using the -Wdeclaration-after-statement
138
-option).
139
-
140
-Another thing: NULL pointers shall be written as NULL, not as 0.
141
-
142
-
130
(2) Generate your patch using git tools out of your commits.
131
132
git based diff tools generate unidiff which is the preferred format.