Web lists-archives.com

Re: how to check GCC default C standard




On Mon, Sep 25, 2017 at 05:10:32PM +0000, 慕 冬亮 wrote:
how do I check the default C standard GCC uses? I check "gcc -v"(list
below), but nothing is found.

the default is to not be standards compliant. if you need a specific standard you should specify it (e.g., -std=c11)

gcc version 7.2.0 (Debian 7.2.0-5)

The info page or
https://gcc.gnu.org/onlinedocs/gcc-7.2.0/gcc/Standards.html#Standards

notes "The default, if no C language dialect options are given, is -std=gnu11" and gnu11 as "C11 with GNU extensions" for gcc 7.2.0.

Mike Stone