Empty enums trigger compiler error.
abnercoimbre opened this issue · 3 comments
I'm replacing the Windows SDK with vkbind for my helper library, but I've hit upon this possible bug:
inc/vkbind.h(1594,1): error: use of empty enum
} VkShaderModuleCreateFlagBits;
^
inc/vkbind.h(6365,1): error: use of empty enum
} VkAcquireProfilingLockFlagBitsKHR;
^
inc/vkbind.h(7788,1): error: use of empty enum
} VkPipelineCompilerControlFlagBitsAMD;
^
inc/vkbind.h(8382,1): error: use of empty enum
} VkShaderCorePropertiesFlagBitsAMD;
^
inc/vkbind.h(9333,1): error: use of empty enum
} VkPrivateDataSlotCreateFlagBitsEXT;
^
A cursory look at vkbind.h
shows these enums are indeed empty. I've never given it serious thought, but this SO question seems to indicate they are ill-formed statements (at least in the c++ standard.) Thoughts?
P.S. For context, I'm on a recent Windows 10 build using a recent clang compiler (clang-cl.exe
). My codebase is all plain C.
Thanks for reporting! I'll go ahead and fix this. Just looking at the official headers, they use the VK_SHADER_CORE_PROPERTIES_FLAG_BITS_MAX_ENUM_AMD = 0x7FFFFFFF
pattern which naturally fixes that error. I suppose I should probably copy that since it'll fix this error, but will also make vkbind more drop-in-compatible with the official headers.
I've gone and pushed a fix for this: 015bb25. You able to give that a try and let me know how it goes? Seems to be working on MSVC.
Works like a charm with clang-cl.exe
as well! Thanks for the quick fix!