error: unknown type name 'bool' #270
-
Non-progammer and D newbie here. I thought I would ask here before reporting as a bug. Using
Header files that do not use the I'm not sure where the problem lies since it seems unlikely that a fundamental type would be unknown to dstep. I assume it's something in my system or setup. Any guidance is appreciated, thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
Do you have an example of some code that DStep fails to convert? Also how you run the DStep command. C doesn't have a type called [1] https://clang.llvm.org/docs/CommandGuide/clang.html#cmdoption-std |
Beta Was this translation helpful? Give feedback.
Do you have an example of some code that DStep fails to convert? Also how you run the DStep command.
C doesn't have a type called
bool
. It has a type called_Bool
and thestdbool.h
header file provides an alias calledbool
. This type was added in C99. Thestdbool.h
file is a compiler internal header file which is bundled with DStep. It should work out of the box. The only reason I can think of is that DStep defaults to an older standard of C, were this type is not available. You can use the-std=<standard>
flag to specify the C standard, see [1] for more information. DStep uses Clang under the hood, any flags that can be passed to Clang can be passed to DStep.[1] https://clang.llvm.org/d…