Last modified: Monday, August 05, 2024

Default C Language Standard for gcc

gcc, C language

The C compiler gcc in GCC (The GNU Compiler Collection)[External Site] supports several C language standards. If you do not specify a C language standard with the gcc command line option -std=, the default C language standards are shown in the table below.

If you want to use a newer (or older) C language standard, you must specify it explicitly by the command line option.

Correspondence between gcc versions and default C language standards
gcc versionrelease datedefault C language standard
2.95.32001/03/16gnu89 (ISO9899:1990+GNU extensions)
3.0.42002/02/20gnu89 (C89+GNU extensions)
3.1.12002/07/25gnu89 (C89+GNU extensions)
3.2.32003/04/22gnu89 (C89+GNU extensions)
3.3.62005/05/03gnu89 (C90+GNU extensions)
3.4.62006/03/06gnu89 (C90+GNU extensions)
4.0.42007/01/31gnu89 (C90+GNU extensions)
4.1.22007/02/13gnu89 (C90+GNU extensions)
4.2.42008/05/19gnu89 (C90+GNU dialect)
4.3.62011/06/27gnu89 (C90+GNU dialect)
4.4.72012/03/13gnu89 (C90+GNU dialect)
4.5.42012/07/02gnu90 (C90+GNU dialect)
4.6.42013/04/12gnu90 (C90+GNU dialect)
4.7.42014/06/12gnu90 (C90+GNU dialect)
4.8.52015/06/23gnu90 (C90+GNU dialect)
4.9.42016/08/03gnu90 (C90+GNU dialect)
5.52017/10/10gnu11 (C11+GNU dialect)
6.52018/10/26gnu11 (C11+GNU dialect)
7.52019/11/14gnu11 (C11+GNU dialect)
8.52021/05/14gnu17 (C17+GNU dialect)
9.52022/05/27gnu17 (C17+GNU dialect)
10.52023/07/07gnu17 (C17+GNU dialect)
11.52024/07/19gnu17 (C17+GNU dialect)
12.42024/06/20gnu17 (C17+GNU dialect)
13.32024/05/21gnu17 (C17+GNU dialect)
14.12024/05/07gnu17 (C17+GNU dialect)

How to specify C language standards

For gcc 2.95.3 and earlier, specify with the -fstd= option. For gcc-3 and later, specify with the -std= option.


Atsushi NUNOME @ Computer System Laboratory at Kyoto Institute of Technology (nunome@kit.ac.jp)