I currently use gcc 4.6.3
. My understanding is that gcc
by default uses the gnu89
standard and I would like to enable C11, the latest C standard. I tried:
[pauldb@pauldb-laptop test ]$ gcc -std=c11 -o test test.c
cc1: error: unrecognised command line option ‘-std=c11’
I replaced c11
with gnu11
and I get the same error. What is the correct way to enable the latest C standard for gcc?
(Note: I'm interested in the latest C standard and not the latest C++ one.)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…