KhronosGroup / KhronosGroup/SPIRV-Reflect
GCC_VERSION used in spirv_reflect.h but is undefined
- Dominant language
- C
- Stars
- 871
- Forks
- 188
- Avg merge
- 19m
- Merged PRs (30d)
- 1
Description
According to [GCC's documentation](https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html) the macro `GCC_VERSION` is not predefined, but rather can be defined as `#define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)` in order to compare the GCC version against a single integer constant. The `spirv_reflect.h` header uses this macro, but fails to define it causing it to be evaluated as zero and the `#if` it is used for to always be false.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in spirv_reflect.h and inspect the preprocessor conditional that uses GCC_VERSION alongside GCC's predefined macros. Verify the behavior with a GCC preprocessing or build check; done means the conditional compares the intended GCC version instead of treating GCC_VERSION as zero.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 58/100