#ifndef #define pattern - don't generate const
Open
package:ffigen
- Dominant language
- Dart
- Stars
- 275
- Forks
- 144
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 47
Description
```c
#ifndef __GNUC_VA_LIST
#define __GNUC_VA_LIST
! #if defined(__svr4__) || defined(_AIX) || defined(_M_UNIX) || defined(__NetBSD__)
! typedef char *__gnuc_va_list;
! #else
! typedef void *__gnuc_va_list;
! #endif
#endif
```
This generates a `const int __GNUC_VA_LIST = 1;`.
The const is meaningless here, because it's never used as integer.
Workaround:
```yaml
macros:
exclude:
- __GNUC_VA_LIST
```
Could we detect this pattern?
Contributor guide
Assessment
This issue has not been assessed yet.