diff options
Diffstat (limited to 'doc/README.developer')
-rw-r--r-- | doc/README.developer | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/doc/README.developer b/doc/README.developer index 52df3a6fcc..aa375db636 100644 --- a/doc/README.developer +++ b/doc/README.developer @@ -82,25 +82,32 @@ features. The C99 features that can be used are: - trailing comma in enum declarations - inline functions (guaranteed only by use of glib.h) -Don't initialize variables with static storage duration - i.e., global -or static variables - or objects with aggregate type (arrays and -structures) in their declaration with non-constant values. Not all -compilers support this. E.g., if "i" is a static or global variable, -don't declare i as +Don't initialize global or static variables (variables with static +storage duration) in their declaration with non-constant values. Not +all compilers support this. E.g., if "i" is a static or global +variable, don't declare "i" as guint32 i = somearray[2]; -declare it as just +outside a function, or as + + static guint32 i = somearray[2]; + +inside or outside a function, declare it as just guint32 i; +or + + static guint32 i; + and later, in code, initialize it with i = somearray[2]; -instead. Initializations of non-aggregate variables with automatic -storage duration - i.e., local variables - with non-constant values is -permitted, so, within a function +instead. Initializations of variables with automatic storage duration - +i.e., local variables - with non-constant values is permitted, so, +within a function guint32 i = somearray[2]; |