[Issue 24811] Cant compile C code

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Oct 15 10:07:05 UTC 2024


https://issues.dlang.org/show_bug.cgi?id=24811

--- Comment #1 from barbosso <my-ijet at mail.ru> ---
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
|         ^

--


More information about the Digitalmars-d-bugs mailing list