Is there a way to check the default version of C89, C90, or C99 that gcc uses to compile your programs? I tried -v and --version but they only give the actual package of gcc info.

Recommended Answers

The GCC compiler has a switch -std which can determine the language standard.

Try searching this link for the -std switch options.

http://linux.die.net/man/1/gcc

Jump to Post

All 2 Replies

The GCC compiler has a switch -std which can determine the language standard.

Try searching this link for the -std switch options.

http://linux.die.net/man/1/gcc

The default version is gnu89.

"'g89' GNU dialect of ISO C90 (including some C99 features). This is the default for C code."
Source

Look at that link to see all the available standards.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.