Open
Description
This issue keeps track of all the bindgen
issues related to preprocessing directives. The two most common reasons for these issues are the following:
libclang
doesn't have a "good enough" API to implement all the desired features.rust-cexpr
cannot evaluate certain expressions.
However, this is not an exhaustive list and there might be more issues blocking these.
- Failure to evaluate #define directives if they use values from defines passed through clang args #2394
- Interaction between wrapped statics and redefined function #2420
- Bindgen skips macros with token concatenation. #2402
- Add flag to parse matching
#define *
intoenum
s instead of constants #2174 - Float constants with exponents are not parsed in macros #1928
- Define macro type aliases / Custom macro parsing in special use cases #1754
- Treat #define similarly to templates when used for types #1044
- Functional C macros are not expanded. #753
- Improve macro defined constants to recognize #define CONSTANT ((int) 1) #316
- #define + sizeof(...) fails to emit constant #666
- macros defining integer constants using expressions containing enum values don't work #258
- bad type recognition, despite explicit suffix #1875
- Error when using unicode character literals #2475
- Avoid assigning (wrong) types to constants using #define #2120
- Macro redefinitions are not being respected #2472
- Support #define old_function new_function #2544
- MSVC C Integer constants are not supported #2600