https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78267
--- Comment #13 from Maxim Ostapenko <m.ostapenko at samsung dot com> --- (In reply to Rainer Orth from comment #11) > (In reply to Jakub Jelinek from comment #5) > > extern char **environ; > > #endif > > > > -#if defined(__has_include) && __has_include(<os/trace.h>) > > +#if defined(__has_include) && __has_include(<os/trace.h>) && > > defined(__clang__) > > #define SANITIZER_OS_TRACE 1 > > #include <os/trace.h> > > #else > > > > is preapproved if it works. > > I'd use fixincludes instead to wrap the two offending declarations in > <os/trace.h> > with #ifdef __BLOCKS__. > > This is a macOS bug, actually: many other places using the Blocks extension > already wrap them correctly. > > I've filed Bug 29184470 <os/trace.h> uses Blocks extension unconditionally > for > this. > > Rainer The fixincludes fix looks cleaner, but it's harder to me to cook a patch because: 1) I have no experience with fixincludes. 2) I have no Darwin machine to test the fix. I can try fixincludes anyway, but this may take some time. But if the issue is urgent, can we try to ifdef out <os/trace.h> and <asl.h>? There isn't much lost in functionality, corresponding code reflects to printing sanitizer logs into syslog on Darwin.