"" <> writes:
> i wonder that if not use -std=c99, which std it compile with? how
> can i find that out?
GNU C, which can be more or less accurately described as C89 with
extensions.
The problem with declarations in the initialization part of a for loop
is that GCC had a similar feature with slightly different semantics
before it was standardized. Code that relies on those semantics will
either not compile or produce different results with -std=c99, so the
GCC maintainers have decided to deprecate the old extension.
DES
--
Dag-Erling Smørgrav -