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.

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

Member Avatar for Mouche

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 developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.