Hello,
When typecasting pointer types to an integer type, the compiler emits a warning about the conversion being non-portable, which is just fine.
By right clicking on the warning sign found in the gutter, the Lazarus IDE offers three options to hide/remove the warning but, none of the _compiler_ options are to remove the warning _only_ for that occurrence. The only offered option that removes it _only_ for that occurrence is by inserting an IDE directive (which is obviously dependent on compiling inside the IDE.)
It would be very nice if Lazarus offered a compiler option, independent of the IDE, to disable the warning _only_ for that occurrence.
Removing it only for that occurrence would require pushing the current options, inserting the $warn off before the problem statement and adding $pop immediately after the problem statement.
Please refer to the attachment.
Ideally, the IDE would insert the necessary compiler directives as they appear for the "SeconcField" example in the attachment.
Comments welcome.