Skip to content

Commit

Permalink
Don't reference DMD-specific flags when IN_GCC (#20731)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibuclaw authored Jan 18, 2025
1 parent 9c97204 commit 8061aa8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion compiler/src/dmd/safe.d
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,12 @@ extern (D) void reportSafeError(FuncDeclaration fd, bool gag, Loc loc,
if (fd.isSafe())
buf.writestring(" is not allowed in a `@safe` function");
else
buf.writestring(" is not allowed in a function with default safety with `-preview=safer`");
{
version (IN_GCC)
buf.writestring(" is not allowed in a function with default safety with `-fpreview=safer`");
else
buf.writestring(" is not allowed in a function with default safety with `-preview=safer`");
}
.error(loc, "%s", buf.extractChars());
}
}
Expand Down

0 comments on commit 8061aa8

Please sign in to comment.