From 7baddd7b916eef20b781ee3e695d57fba0cae55c Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Fri, 17 Sep 2004 09:32:53 +0000 Subject: [PATCH] Note that declarations in the middle of a block aren't supported by all compilers, and thus shouldn't be used. svn path=/trunk/; revision=12029 --- doc/README.developer | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/doc/README.developer b/doc/README.developer index 3968de7e00..cbca41f014 100644 --- a/doc/README.developer +++ b/doc/README.developer @@ -214,6 +214,16 @@ as some compilers will reject the first of those statements. Instead, initialize the array at the point at which it's first declared, so that the size is known. +Don't put declarations in the middle of a block; put them before all +code. Not all compilers support declarations in the middle of code, +such as + + int i; + + i = foo(); + + int j; + For #define names and enum member names, prefix the names with a tag so as to avoid collisions with other names - this might be more of an issue on Windows, as it appears to #define names such as DELETE and