David Empson wrote: > Perhaps SQLite’s test procedure should be enforcing strict ANSI C mode? > If this is already being done, then the compiler(s) used might not be > enforcing this particular rule.
"gcc -pedantic -std=c90" (or gnu90) would check for this error: test.c:6:3: warning: initializer element is not computable at load time [-Wpedantic] > [...] > Therefore Visual C++ 2008 does have extensions to ANSI C90 which allow > a non-constant initializer for an aggregate type with auto storage. > (I also tested Visual C++ 98 and it worked there too.) > > However if I tell Visual C++ to enable strict ANSI C mode by adding > the /Za command line option, I get an error: > > test.c(45) : error C2097: illegal initialization So neither compiler complains unless you explicitly tell it to. (But that extra checking _is_ useful for compatibility.) Regards, Clemens _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users