diff --git a/compiler/src/dmd/expressionsem.d b/compiler/src/dmd/expressionsem.d index 3ed06fd619..5bacc99a22 100644 --- a/compiler/src/dmd/expressionsem.d +++ b/compiler/src/dmd/expressionsem.d @@ -1471,7 +1471,7 @@ Lagain: { if (sd.isSystem()) { - if (sc.setUnsafePreview(global.params.systemVariables, false, loc, + if (sc.setUnsafe(false, loc, "cannot access `@system` variable `%s` in @safe code", sd)) { if (auto v = sd.isVarDeclaration()) diff --git a/compiler/src/dmd/safe.d b/compiler/src/dmd/safe.d index aa810dada1..f879ab2db9 100644 --- a/compiler/src/dmd/safe.d +++ b/compiler/src/dmd/safe.d @@ -61,7 +61,7 @@ bool checkUnsafeAccess(Scope* sc, Expression e, bool readonly, bool printmsg) import dmd.globals : global; if (v.isSystem()) { - if (sc.setUnsafePreview(global.params.systemVariables, !printmsg, e.loc, + if (sc.setUnsafe(!printmsg, e.loc, "cannot access `@system` field `%s.%s` in `@safe` code", ad, v)) return true; } diff --git a/druntime/src/core/internal/gc/impl/conservative/gc.d b/druntime/src/core/internal/gc/impl/conservative/gc.d index e4801e2095..0281321d06 100644 --- a/druntime/src/core/internal/gc/impl/conservative/gc.d +++ b/druntime/src/core/internal/gc/impl/conservative/gc.d @@ -1460,7 +1460,7 @@ short[PAGESIZE / 16][Bins.B_NUMSMALL + 1] calcBinBase() return bin; } -size_t baseOffset(size_t offset, Bins bin) @nogc nothrow +size_t baseOffset(size_t offset, Bins bin) @nogc nothrow @system { assert(bin <= Bins.B_PAGE); return (offset & ~(PAGESIZE - 1)) + binbase[bin][(offset & (PAGESIZE - 1)) >> 4]; @@ -1765,7 +1765,7 @@ struct Gcx /** * */ - void runFinalizers(const scope void[] segment) nothrow + void runFinalizers(const scope void[] segment) nothrow @system { ConservativeGC._inFinalizer = true; scope (failure) ConservativeGC._inFinalizer = false; @@ -1920,7 +1920,7 @@ struct Gcx : bigAlloc(size, alloc_size, bits, ti); } - void* smallAlloc(size_t size, ref size_t alloc_size, uint bits, const TypeInfo ti) nothrow + void* smallAlloc(size_t size, ref size_t alloc_size, uint bits, const TypeInfo ti) nothrow @system { immutable bin = binTable[size]; alloc_size = binsize[bin]; @@ -3717,7 +3717,7 @@ struct Pool /** * */ - uint getBits(size_t biti) nothrow + uint getBits(size_t biti) nothrow @system { uint bits; diff --git a/druntime/src/rt/aaA.d b/druntime/src/rt/aaA.d index 4289bb5a92..4bc7f1aa33 100644 --- a/druntime/src/rt/aaA.d +++ b/druntime/src/rt/aaA.d @@ -265,7 +265,7 @@ private bool hasDtor(const TypeInfo ti) pure nothrow return false; } -private immutable(void)* getRTInfo(const TypeInfo ti) pure nothrow +private immutable(void)* getRTInfo(const TypeInfo ti) pure nothrow @system { // classes are references const isNoClass = ti && typeid(ti) !is typeid(TypeInfo_Class); @@ -339,7 +339,7 @@ TypeInfo_Struct fakeEntryTI(ref Impl aa, const TypeInfo keyti, const TypeInfo va // build appropriate RTInfo at runtime immutable(void)* rtinfoEntry(ref Impl aa, immutable(size_t)* keyinfo, - immutable(size_t)* valinfo, size_t* rtinfoData, size_t rtinfoSize) pure nothrow + immutable(size_t)* valinfo, size_t* rtinfoData, size_t rtinfoSize) pure nothrow @system { enum bitsPerWord = 8 * size_t.sizeof;