Don't reference DMD-specific flags when IN_GCC (#20731)

This commit is contained in:
Iain Buclaw 2025-01-18 22:37:35 +01:00 committed by GitHub
parent 9c9720493d
commit 8061aa84c1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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());
}
}