B.33 Initialization (§3.5.7)

C allows initializers to be optionally surrounded by braces ( { } ) when they are not logically necessary. This has resulted in aggregate initializers with partially ignored braces that are parsed differently depending on the type of parser implemented (bottom-up or top-down). The Standard has specified the top-down parse originally specified in Kernighan and Ritchie's The C Programming Language. Programs depending on a bottom-up parse (common C parse) of partially braced initializers can yield unexpected results. Even though this construct is allowed, a warning message is given to inform the user of ignored braces when in common C mode or if using the check option.


Previous Page | Next Page | Table of Contents | Index