aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2004-09-17 09:32:53 +0000
committerGuy Harris <guy@alum.mit.edu>2004-09-17 09:32:53 +0000
commit7baddd7b916eef20b781ee3e695d57fba0cae55c (patch)
tree6f4794ebc8020246a163827ec97b1ee2f4c7d2ff
parent6bc5ac39495c4cdfd25939286b1b1cd4427a9a5b (diff)
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
-rw-r--r--doc/README.developer10
1 files changed, 10 insertions, 0 deletions
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