Which C version is used in the Linux kernel?

后端 未结 3 1253
被撕碎了的回忆
被撕碎了的回忆 2020-12-13 04:06

Does the Linux kernel use only the old C90 syntax or has it been optimized with C99 / C11 features?

I was wondering if the newest versions of C are used when possible

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-13 04:41

    As of now, the document at https://www.kernel.org/doc/html/latest/process/programming-language.html says:

    The kernel is written in the C programming language [c-language]. More precisely, the kernel is typically compiled with gcc [gcc] under -std=gnu89 [gcc-c-dialect-options]: the GNU dialect of ISO C90 (including some C99 features).

提交回复
热议问题