mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-06 04:57:49 +00:00
fixes #25066
Probably it is not worth implementing comparing pointers at compile
time. For a starter, we can improve the error message instead of letting
it crash
(cherry picked from commit e2a294504e)
This commit is contained in:
@@ -1182,8 +1182,10 @@ proc genMagic(c: PCtx; n: PNode; dest: var TDest; flags: TGenFlags = {}, m: TMag
|
||||
of mEqF64: genBinaryABC(c, n, dest, opcEqFloat)
|
||||
of mLeF64: genBinaryABC(c, n, dest, opcLeFloat)
|
||||
of mLtF64: genBinaryABC(c, n, dest, opcLtFloat)
|
||||
of mLePtr, mLeU: genBinaryABC(c, n, dest, opcLeu)
|
||||
of mLtPtr, mLtU: genBinaryABC(c, n, dest, opcLtu)
|
||||
of mLeU: genBinaryABC(c, n, dest, opcLeu)
|
||||
of mLtU: genBinaryABC(c, n, dest, opcLtu)
|
||||
of mLePtr, mLtPtr:
|
||||
globalError(c.config, n.info, "pointer comparisons are not available at compile-time")
|
||||
of mEqProc, mEqRef:
|
||||
genBinaryABC(c, n, dest, opcEqRef)
|
||||
of mXor: genBinaryABC(c, n, dest, opcXor)
|
||||
|
||||
Reference in New Issue
Block a user