Skip to content

Comment on A nice, little known C feature: Static array indices in parameter declarationsparent

Comments

Not in front of a computer, but have you tried -std=gnu99

Thats a bad way of writing code, to be honest. On projects I run, code has to be warning free with -Wall -Wextra -pedantic -std=c99

It's not bad at all, at least if you've made the conscious decision to write GNU C and not std C, and accept that non-gcc compilers (except maybe clang) may not be able to compile your code.

Unfortunately, though, I believe one of the -std=gnuXX variants is the default, so most people don't make that a conscious decision.

gnu89 is the default. gnu99 will be the default when C99 is fully implemented (from the manpage, search for /-std=$/)

C99 is still not fully implemented in GCC? What's missing?

Just tried it now. Still compiles/runs without errors.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.