Created attachment 1919 [details] lib.c How to reproduce //lib.c typedef float _Float32; typedef double _Float64; typedef double _Float32x; typedef long double _Float64x; // clang -c lib.c # compile OK dmd -c lib.c # compile ERRORS lib.c(1): Error: illegal combination of type specifiers lib.c(2): Error: illegal combination of type specifiers lib.c(3): Error: illegal combination of type specifiers lib.c(4): Error: illegal combination of type specifiers lib.c(4): Error: illegal type combination
I found possible solution This error occure with inclusion of "/usr/include/bits/floatn-common.h" system lib to prevent error you can define __GNUC__ to be greater than 7 (for example - comment definition) //lib.c #define __GNUC__ 8 #include <bits/floatn-common.h> // clang -c lib.c # compile OK dmd -c lib.c # compile OK with WARNING lib.c:1:9: warning: '__GNUC__' macro redefined [-Wmacro-redefined] 1 | #define __GNUC__ 8 | ^ <built-in>:7:9: note: previous definition is here 7 | #define __GNUC__ 4 | ^
SDL3 with callbacks also cant compile How to reproduce //SDL3.c #define __GNUC__ 8 #define SDL_MAIN_USE_CALLBACKS 1 /* use the callbacks instead of main$ #include <SDL3/SDL.h> #include <SDL3/SDL_main.h> // clang -c SDL3.c # compile OK ldc -c SDL3.c # compile ERRORS /usr/include/SDL3/SDL_stdinc.h(4294): Error: undefined identifier `__builtin_mul_overflow` /usr/include/SDL3/SDL_stdinc.h(4332): Error: undefined identifier `__builtin_add_overflow` /usr/include/SDL3/SDL_bits.h(79): Error: undefined identifier `__builtin_clz`