How to enable c11 on later versions of gcc?

后端 未结 4 596
轮回少年
轮回少年 2020-12-09 14:29

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

4条回答
  •  长情又很酷
    2020-12-09 15:15

    The correct option is -std=c11.

    However, it is not available in gcc 4.6. You need at least gcc 4.7 to have this option supported. In some older versions like gcc 4.6, the option -std=c1x was available with experimental (i.e., very limited) support of C11.

    Note that the current version of gcc is gcc 8.2.

提交回复
热议问题