The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,230 other followers

Cool post from Marc’s Blog: Delphi XE2’s hidden hints and warnings options

Posted by jpluimers on 2014/04/05

A while ago, I had to disable a couple of warnings from legacy code so I could first perform the Unicode conversion, then make time to eliminate the actual warning cause.

This post was much helpful here:

Marc’s Blog: Delphi XE2’s hidden hints and warnings options.

He lists all the W#### and X#### warnings he could find in Delphi XE2 (XE3, XE4 and XE5 more or less have the same), including the mapping to the equivalent directive IDs used inside these blocks:


I also learned that the DEFAULT value restores an option to what you specified in the project settings.


11 Responses to “Cool post from Marc’s Blog: Delphi XE2’s hidden hints and warnings options”

  1. David Taylor said

    I saw Peter Wright’s comment on QC103993 (i.e. External exception C0000026 when starting to debug an application). I was going to add a comment to the QC, but alas it is closed as fixed in XE6. A lot of good that does for people using older releases such as XE2. Since I found your post by searching for this QC, I thought it might be helpful to post a solution to this dreadful bug that people might actually find. A rather sad state of affairs that a core feature like debugging can be broken for so long.

    After trying *everything* I could find or think of myself, I finally found a simple solution that works every time, at least in my environment. The solution is to close and reopen the project after launching the IDE. There may be other reasons for the IDE crashing on debug such as AQTime, but this one has fixed the problem for the last month…not a single crash.

  2. Wouter said

    It would be nice if code completion worked on these. I always have to Google to find the right names.

    Also, it would be nice if you could right-click on a compiler warning, and choose “ignore/suppress this” “ignore/suppress all of this type” to update a specific piece of code, or global project settings.

    Finally, the Delphi IDE and syntax highlighting are all dumb when it comes to conditional defines. Unless it’s executable code, there’s no way to see what’s actually being compiled. There’s plenty of room for improvement in this area.

    • jpluimers said

      All great ideas. Did you QC them?

      • Peter Wright said

        I’ve QC’d my blockbuster suggestion. If the troglodytes see it, they’ll have kittens. I don’t expect it to see the light of day. Still, they can’t say I’ve not tried. QC 124011 if you’re game. Best accessed hrough your QC client IMHO – seems to work better and faster than using a browser.

        Yet another reason to expect no action from EMBT: QC 103993/104298/111022. Allegedly “Resolved”. Grand total information about the “resolution” – and I’ll quote it in full : “Third Party.” That’s it. Just “Third Party”. no guide about how to resolve it on YOUR version (affects XE2+, at least) How it can be “resolved” when the reporting module (AQtime) has been uninstalled as reported by some EMBT customers (self included) is beyond me. But that’s what’s claimed. “Third Party”.

        Hence, after spending some hours formulating my suggestion, anticipating that it will be mechanically downvoted by people with open mouths and closed minds, ignored by QC and implicitly dismissed, the suggestion re turning warning/error/hint switches on and off by number rather than name and of dismissing W1019 as plain farcical will have to wait until I’ve got another spare hour or two to do battle with the QC black hole.

  3. Peter Wright said

    Now – call me silly (you wouldn’t be Robinson Crusoe) – but I reckon that rather than looking up that table, or one similar to it, {$WARN W1000 ON} is preferable to {$WARN SYMBOL_DEPRECATED ON}. It’s language-independent for a start. Now all we have to do is persuade EMBT to implement it as another choice in addition to {$WARN SYMBOL_DEPRECATED ON}…

    • jpluimers said

      Good idea!

    • sglienke said

      Language independent is not an argument. Writing Delphi code usually is also in english. So I rather see a SYMBOL_DEPRECATED than some magic numbers which I then have to look up or write some // disable the deprecated warning comment on it… Also more error prone if you make some typo (“whoops, I just disabled W1010 instead of W1011”).

      • jpluimers said

        On the other hand it makes sense to give error messages and directives the same name.

      • Peter Wright said

        The warning code is provided in the messages window. The symbolic equivalent is not. You don’t have to look up the codes – they’re right there on-screen for you. In fact you have to look up the symbolic code – it’s well-documented in the HELP. If you mistype the code, then the warning you were attempting to suppress won’t disappear. That’s a dead-set giveaway. As I said, it’s in addition to the existing control facility. You want to spend your life looking up the codes and typing them from a list – good luck, that’ll still work. If you don’t want to use this additional method, there’s nothing forcing it onto you. Don’t use it – simple as that.

        Beats me why a W1019 For loop control variable must be simple local variable appears at all. The code still compiles and executes happily. It’s the message itself that’s in error. And no, I neither know nor care what its symbolic equivalent is.

        Gee – let’s hope I get a better reaction to my other get-Delphi-out-of-the-caveman-era suggestions. So far, sadly, it looks like the Troglodytes will win…

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: