Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/src/dmd/link.d
Original file line number Diff line number Diff line change
Expand Up @@ -1196,7 +1196,7 @@ public int runPreprocessor(Loc loc, const(char)[] cpp, const(char)[] filename, c
// need to redefine some macros in importc.h
argv.push("-Wno-builtin-macro-redefined");

if (target.os == Target.OS.OSX)
version (OSX)
{
argv.push("-fno-blocks"); // disable clang blocks extension
argv.push("-E"); // run preprocessor only for clang
Expand Down
14 changes: 14 additions & 0 deletions compiler/test/compilable/test23356.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// DISABLED: win linux freebsd openbsd netbsd dragonflybsd hurd
// REQUIRED_ARGS: -os=linux
// If clang is invoked improperly as a preprocessor,
// then this will fail to compile and link due to `__check` being undefined.
// If clang is invoked properly as a preprocessor then this will succeed
// as clang won't attempt to compile nor link the file.

// https://github.com/dlang/dmd/issues/23356

int main(void)
{
__check(1);
return 0;
}
Loading