diff --git a/changelog.md b/changelog.md index 5197c9fab2..4ca248d496 100644 --- a/changelog.md +++ b/changelog.md @@ -46,7 +46,7 @@ - A bug allowed `macro foo(): int = 123` to compile even though a macros has to return a `NimNode`. This has been fixed. -- `shr` is now sign preserving. Use `-d:oldShiftRight` to enable old +- `shr` is now sign preserving. Use `-d:nimOldShiftRight` to enable old behavior globally. - With the exception of `uint` and `uint64`, conversion to unsigned types diff --git a/config/nim.cfg b/config/nim.cfg index 7c2e0246d9..fb7d02436a 100644 --- a/config/nim.cfg +++ b/config/nim.cfg @@ -278,5 +278,5 @@ tcc.options.always = "-w" --multimethods:on --oldAst:on --define:nimOldCaseObjects - --define:oldShiftRight + --define:nimOldShiftRight @end diff --git a/lib/system.nim b/lib/system.nim index de5fe36909..ac91dcbacb 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -1271,7 +1271,7 @@ else: when defined(nimNewShiftOps): - when defined(oldShiftRight) or not defined(nimAshr): + when defined(nimOldShiftRight) or not defined(nimAshr): const shrDepMessage = "`shr` will become sign preserving." proc `shr`*(x: int, y: SomeInteger): int {.magic: "ShrI", noSideEffect, deprecated: shrDepMessage.} proc `shr`*(x: int8, y: SomeInteger): int8 {.magic: "ShrI", noSideEffect, deprecated: shrDepMessage.}