Recent

Author Topic: Negative offset  (Read 584 times)

LemonParty

  • Full Member
  • ***
  • Posts: 185
Negative offset
« on: May 18, 2025, 06:05:47 pm »
I notice when compile code like this:
Code: Pascal  [Select][+][-]
  1. mov qword ptr[rsp-8],rsi
compiler give warning
Quote
Warning: Use of [RSP-offset], access may cause a crash or value may be lost
What can be done with this or this warning may be ignored?
Lazarus v. 4.99. FPC v. 3.3.1. Windows 11

ASerge

  • Hero Member
  • *****
  • Posts: 2421
Re: Negative offset
« Reply #1 on: May 18, 2025, 10:16:37 pm »
Code: Pascal  [Select][+][-]
  1.     {$PUSH}
  2.     {$WARN 7105 off : Use of $1, access may cause a crash or value may be lost}
  3.     mov qword ptr[rsp-8],rsi
  4.     {$POP}
  5.  

LemonParty

  • Full Member
  • ***
  • Posts: 185
Re: Negative offset
« Reply #2 on: May 19, 2025, 12:58:11 pm »
Thank you.
Lazarus v. 4.99. FPC v. 3.3.1. Windows 11

 

TinyPortal © 2005-2018