Feature request/suggestion lazarus / 13-General ---------------------------------------------------------------------- 440bx · 2025-12-27 09:23 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. ---------------------------------------------------------------------- Thaddy · 2025-12-27 10:25 I second that. It often makes no sense to disable per unit or globally. What you suggest, I consider "the proper way". Good suggestion. ---------------------------------------------------------------------- JuhaManninen · 2025-12-28 16:57 440bx, I believe you could implement it yourself. I am sure a patch would be accepted. See unit etMessageFrame and unit etQuickFixes. For example code you can search resource string names like lisHideMessageByInsertingIDEDirectiveH and lisHideMessageAtByInsertingIDEDirectiveH. ---------------------------------------------------------------------- 440bx · 2025-12-28 18:13 Someday I hope I can contribute.. so far I'm still working on some of what I consider the basics which is what's causing me to find these bugs.  ETA: I realize this is a thread about a request/suggestion but, as a result of it I found a bug related to turning the conversion warning on and off.   I was thinking about that when answering your post.