Issue
When compiling code that directly or indirectly references glm/detail/qualifier.hpp with -Wsign-conversion enabled, the following warnings are produced:
.../glm/detail/qualifier.hpp:88:33: warning: conversion to 'long long unsigned int' from 'int' may change the sign of the result [-Wsign-conversion]
88 | T data[L];
| ^
.../glm/detail/qualifier.hpp:97:41: warning: conversion to 'long long unsigned int' from 'int' may change the sign of the result [-Wsign-conversion]
97 | T data[L];
|
Toolchain
- OS Name: Microsoft Windows 10 Pro N
- OS Version: 10.0.19045 Build 19045 AMD64
- Environment: MinGW 11.0 w64
- CMake: 4.2.2
- G++ Version: 13.1.0 (GCC)
- GLM Version: 1.0.3
Reproduction Code
CMakeLists.txt
cmake_minimum_required(VERSION 4.2)
project(glm_test)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(GLM_VERSION 1.0.3)
include(FetchContent)
FetchContent_Declare(
glm
URL https://github.com/g-truc/glm/archive/refs/tags/${GLM_VERSION}.tar.gz
OVERRIDE_FIND_PACKAGE
)
FetchContent_MakeAvailable(glm)
add_executable(glm_test main.cpp)
target_link_libraries(glm_test PRIVATE glm::glm)
target_compile_options(glm_test PRIVATE -Wsign-conversion)
main.cpp
#include <glm/fwd.hpp>
int main() {
return 0;
}
Issue
When compiling code that directly or indirectly references
glm/detail/qualifier.hppwith-Wsign-conversionenabled, the following warnings are produced:Toolchain
Reproduction Code
CMakeLists.txt
main.cpp