Skip to content

Vulkan tests fail on 32bit x86 systems #465

Open
@tatokis

Description

@tatokis

The Vulkan tests fail on 32bit x86 systems with errors such as:

[root@arch32-builder3 glad-2.0.6]# gcc -Wall -Wextra -Werror -Wsign-conversion -Wcast-qual -Wstrict-prototypes -ansi -pedantic -save-temps /build/glad/src/glad-2.0.6/test/c/compile/vulkan/alias/001/test.c -o /build/glad/src/glad-2.0.6/build/test -I/build/glad/src/glad-2.0.6/build/include /build/glad/src/glad-2.0.6/build/src/vulkan.c -ldl
In file included from /build/glad/src/glad-2.0.6/test/c/compile/vulkan/alias/001/test.c:9:
/build/glad/src/glad-2.0.6/build/include/glad/vulkan.h:4453:1: error: integer constant is too large for 'long' type [-Werror=long-long]      
 4453 | static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_SAMPLED_READ_BIT = 4294967296;

This is because the tests are compiled with -ansi, but on 32bit x86 the only way to get a 64 bit integer is by using long long, which requires C99.

Passing -std=c99 instead of -ansi resolves it. I am unsure as to how this should be properly resolved, as I assume you explicitly want to verify the code builds as C90 on other platforms.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions