Delphi compiles the program without complaint (it decrements the word at the address loword(variable)). FPC will not compile the program even in Delphi mode.I tested in old (Delphi 7) and new (Delphi 10.3) - both give an error at compile time.
Might also be a matter of loword not being a build in or so.Based on the code the compiler (Delphi 2.0 - in my case) generated, it looks like the compiler "knows"/"calculates" the target address.
So if it is a buildin, it can be used in situations that ask an adress, or not.
You can always file it, but having some context is better (like is this in all Delphi versions so?)
currently its a Function which Is why it is behaving this way.I understand why it's behaving that way.
You know I got thinking, yes I know its a dangerous thing to do.For some reason, I don't really know why of course, that line of code reminds me of the C language. ;)
Inc(Pword(@YourDwordOrLongword)[1], howmuch);
Just thinking..