C99 compile - static_assert failure #764
Labels
No labels
3rdparty
Android
API
Author does not respond
bsd
bug
build system/CI
ci-virtual-device
CMake
Contributions Welcome
Core
dependencies
device-specific
documentation
don't_merge
duplicate
enhancement
Example
Haiku
hidraw
hotplug
info required
invalid
libusb
macOS
Misc
Not an issue
question
Release
Test
Test GUI
Windows
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-libusb/hidapi#764
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
With C standard of C99 static_assert is no longer available causing a compile failure:
github.com/libusb/hidapi@a7587175f3/windows/hidapi_descriptor_reconstruct.h (L133)What is the compiler used to trigger this issue?
Take note we only support MSYS2 GCC/clang and MSVC under Windows.
Hi, it would had been the latest msys2 release on Windows.
I just tried latest MSYS2 mingw64 toolchain under Windows 11 and there is no issue to build latest hidapi git.
It only occurs when setting the c standard to 99.
set(CMAKE_C_STANDARD 99)
If this is the only breaking code for C11, I guess we could have a condition on C standard for the compilation.
But I'd like to know what forces you to use C99 to compile HIDAPI?