Where is stdbool.h?

后端 未结 6 1862
温柔的废话
温柔的废话 2020-12-28 15:42

I want to find the _Bool definition on my system, so for systems where it\'s missing I can implement it. I\'ve seen various definitions for it here and on other

6条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-28 16:25

    _Bool is a built-in type, so don't expect to find a definition for it in a header file, even a system header file.

    Having said that, guessing your system from the paths that you are searching, have you looked in /usr/lib/gcc/*/*/include ?

    My "real" stdbool.h lives there. As expected it #defines bool to be _Bool. As _Bool is a type native to the compiler there's no definition for it in the header file.

提交回复
热议问题