-
Notifications
You must be signed in to change notification settings - Fork 113
Open
Description
when compiling glad with clang using the flag -pedantic I get these warnings:
C:/Dev/glad/include\KHR/khrplatform.h:189:9: warning: extension used [-Wlanguage-extension-token]
189 | typedef __int32 khronos_int32_t;
| ^
C:/Dev/glad/include\KHR/khrplatform.h:190:18: warning: extension used [-Wlanguage-extension-token]
190 | typedef unsigned __int32 khronos_uint32_t;
| ^
C:/Dev/glad/include\KHR/khrplatform.h:191:9: warning: extension used [-Wlanguage-extension-token]
191 | typedef __int64 khronos_int64_t;
| ^
C:/Dev/glad/include\KHR/khrplatform.h:192:18: warning: extension used [-Wlanguage-extension-token]
192 | typedef unsigned __int64 khronos_uint64_t;
|
these warnings do not happen on linux.
this seems to be the piece of code where the warning is generated:
EGL-Registry/api/KHR/khrplatform.h
Lines 186 to 194 in 29c4314
| /* | |
| * Win32 | |
| */ | |
| typedef __int32 khronos_int32_t; | |
| typedef unsigned __int32 khronos_uint32_t; | |
| typedef __int64 khronos_int64_t; | |
| typedef unsigned __int64 khronos_uint64_t; | |
| #define KHRONOS_SUPPORT_INT64 1 | |
| #define KHRONOS_SUPPORT_FLOAT 1 |
which is only used if _WIN32 is defined, it uses __intN types that are not standard, causing warnings.
How to reproduce:
- generate glad from here
- copy the
srcandincludedirectories to the root of your project - create a
main.cppin the root of the project - add this code to
main.cpp
#include <glad/glad.h>
int main() {}
- run this command:
clang++ .\src\glad.c .\main.cpp -I .\include\ -pedantic
this will cause the warnings mentioned above.
more info:
OS: Windows 11
clang was installed through visual studio installer (C++ Clang Compiler for Windows)
clang --version output:
clang version 18.1.8
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\Llvm\x64\bin
note sure any of this information is important to the issue but I included them just in case
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels