3 ms·
It's supported by GCC as an extension to C90 too.
by amaterasu 12y ago
It's supported by GCC as an extension to C90 too.
- samatman 12y agowhat does that even mean? Isn't C99 an extension of C90/ANSI? Doesn't GCC support the whole of C99 as an extension to ANSI?
- masklinn 12y agoIt means that GCC will allow/support this even if you set it to std=c89 or std=c90.
- michaelmior 12y agoWon't that only be supported in gnu89 or gnu90 mode?
- edmccard 12y agoNo, it will be supported using -std=c89 or -std=90, unless you also specify -pedantic.
- michaelmior 12y agoYes, I realized after posting that -pedantic is required for strict standards compliance.
- mikeash 12y agoThe GNU modes just enable additional features which conflict with plain C. Any feature which can coexist with plain C will be enabled in the regular C modes too. For example, __typeof__ is enabled everywhere, because the compiler is allowed to do just about anything it wants with a __ prefix, but plain typeof is only enabled in the GNU modes, since it could cause valid C programs using "typeof" for their own purposes to fail to compile.
- dhekir 12y agoC99 is not a strict extension, but as stated in its foreword, "this second edition [C99] cancels and replaces the first edition [C90]". For instance, implicit function declarations are allowed in C90 but not in C99.