Hi all,
On const the manual(s) state "this is a contract between the programmer and the compiler, that the value will not be changed by the called function / procedure".
I was wondering what this means wrt externally linked functions / procedures - especially if these are implemented in assembler. I.e. for the following definition
function abc( const Val: QWORD ):QWORD;register;external name 'abc';
do I have to make sure that (Linux 64 bit ABI exemplary) RDI is equal on entry and exit? That would somehow contradict the ABI definition, that the registers RDI, RSI, RCX, RDX, R8-R11 and RAX have to be considered 'volatile'? Or is the compiler silently ignoring the 'const' declaration in this case?
Kind regards,
MathMan