Closed fp64 closed 9 months ago
stb_image_resize2.h fails to compile under -std=c99: https://godbolt.org/z/aYbKdzGzj
stb_image_resize2.h
-std=c99
It works fine in -std=gnu99, and also in C++. Technically, asm keyword is an extension to C Standard (but "conditionally-supported and implementation defined" part of C++ Standard proper): https://en.cppreference.com/w/c/language/asm https://en.cppreference.com/w/cpp/language/asm
-std=gnu99
asm
The fix is simple: replace asm with __asm__, which should work in all __GNUC__ compilers. I'd imagine -std=c99 is common enough to justify the fix.
__asm__
__GNUC__
fixed
stb_image_resize2.h
fails to compile under-std=c99
: https://godbolt.org/z/aYbKdzGzjIt works fine in
-std=gnu99
, and also in C++. Technically,asm
keyword is an extension to C Standard (but "conditionally-supported and implementation defined" part of C++ Standard proper): https://en.cppreference.com/w/c/language/asm https://en.cppreference.com/w/cpp/language/asmThe fix is simple: replace
asm
with__asm__
, which should work in all__GNUC__
compilers. I'd imagine-std=c99
is common enough to justify the fix.