Re:Adding ANSI C11 C compiler to D so it can import and comp...
by ifreund on Monday May 10, 2021 @04:55AM
(#27103998)
This is due to zig enabling clangs UBSAN by default in unoptimized builds. This can be disabled with `-fno-sanitize=undefined` or by enabling optimizations with `-O2` or `-O3`.
https://github.com/ziglang/zig/issues/4830#issuecomment-6054...
Re:Adding ANSI C11 C compiler to D so it can import and comp...
by Rounin on Monday May 10, 2021 @05:16AM
(#27104128)
Well, as mentioned, I got a whole list of different compile-time options to try - no-this and no-that, but the executable still crashed in the end.
Re:Adding ANSI C11 C compiler to D so it can import and comp...
by matu3ba on Monday May 10, 2021 @04:53AM
(#27103988)
Please be specific with version numbers. Did you file an upstream bug already?
Do you mean https://github.com/BZFlag-Dev/bzflag ? Thats c++ and must be compiled with zig c++.
Re:Adding ANSI C11 C compiler to D so it can import and comp...
by Rounin on Monday May 10, 2021 @05:14AM
(#27104117)
Ah, well, it must have been zig c++, then, necessarily.
Was I planning to file an upstream bug? I was unaware.
I did contact them about it, actually, but it wasn't solved at the time.
Re:Adding ANSI C11 C compiler to D so it can import and comp...
by DrBazza on Monday May 10, 2021 @05:58AM
(#27104356)
Apropos of nothing, but found out that the zig compiler can run C++: https://twitter.com/andy_kelley/status/1391468499676008451?s...
Despite being told numerous compile-time options to use by different manuals and documents and people on IRC, nothing appeared to change the outcome. It might be due to some undefined behaviour in bzflag, of course, but it made zig cc a non-starter for C.