Let me introduce the FixInsight 2015.04 release.

Let me introduce the FixInsight 2015.04 release.

What’s New
  * Delphi XE8 support
  * Introduced rule W522 (“Destructor without an override directive”)
  * Introduced rule W523 (“Interface declared without a GUID”)
  * Improved rules W504, W513, W517, W521
  * Improved parser
  * Minor fixes

http://sourceoddity.com/fixinsight/download.html
http://sourceoddity.com/fixinsight/

Comments

  1. Is there a chance you could add a pointer type check? Cos Delphi's "typed @ pointer" compiler directive often does not work.

    ReplyDelete
  2. Krom Stern Er, in what sense does typed address not work?

    ReplyDelete
  3. Here is my SO question (http://stackoverflow.com/questions/27602515/how-to-track-down-double-pointer-usage-mistakes) and Typed@ bug described in comments (I've got a bit of an issue with Typed@, it does not always enforced @ to be properly typed. Example: dtVsub(@sdir[0], @q[0], @p); Here all three arguments are array [0..2] of Single, but the compiler lets me get away with adding [0] to just first two of them, ignoring the third.)

    ReplyDelete
  4. Looks much better than 2015.03, but W504 needs much more improvements. I'll file it.

    ReplyDelete
  5. Krom Stern Typed address detects that error.  This program

    procedure foo(x: PSingle);
    begin
    end;

    var
      px: PSingle;

    begin
      foo(@px);
    end.

    compiles with typed address off, and does not compile with typed address on.

    Which is what was stated clearly in the answers. I think you are a little confused.

    ReplyDelete
  6. I've converted large C++ project to Delphi. There are thousands of pointers used in such a way. I'm using Delphi XE2 and XE5. The problem with Typed@ is that it works only in 95% of the cases. I had to track down and manually fix several cases like the one described.

    ReplyDelete
  7. Krom Stern Can you show me a simple program that demonstrates one of these supposed compiler bugs? I've not come across any faults with typed address.

    ReplyDelete
  8. Can you look at the actual code? It's https://github.com/Kromster80/RecastNavigationDelphi/ RN_DetourObstacleAvoidance.pas Line 512 should not compile, but it does.

    ReplyDelete
  9. Krom Stern You need to submit a bug report. I expect Emba will fix it. Here's the repro:

    {$TYPEDADDRESS ON}

    type
      PRec = ^TRec;
      TRec = record
        x: array [0..0] of Single;
      end;

    procedure foo(x: PSingle);
    begin
    end;

    procedure bar;
    var
      R: TRec;
      P: PRec;
    begin
      foo(@P.x);// compiles, but should not, because x is not of type Single
      foo(@R.x);// as expecyed, [dcc32 Error]: E2010 Incompatible types: 'PSingle' and 'Pointer'
    end;

    begin
    end.

    Will you submit a bug report, or should I do it?

    ReplyDelete
  10. I agree, it looks like a compiler bug.

    From point of view of FixInsight's code analysis... it's not easy to implement (you asked about it already, I remember, please don't think I ignore it :) ), but I'm working on the improvement of the analysis engine and adding this type of check will not be a big deal at some point of time. So it is on my todo list.

    ReplyDelete
  11. Of course, if Emba don't know about the problem then they cannot fix it, and since it's a clear compiler bug, far and away the best solution is for Emba to fix it.

    ReplyDelete
  12. David Heffernan  Thanks for checking, at least it's good to know it's reproducible. Could you do that please?
    Roman Yankovsky  Sure thing, I was just asking :-)

    ReplyDelete
  13. Krom Stern I could submit a bug report, but perhaps that would be something that would be worth your while learning how to do? Then when you find bugs you can report them and give Emba a chance to fix them, which benefits everyone.

    Of course, if you can't or won't submit the bug report, then I will, but I do think it would be better if you did so. That has more long term benefit to the community.

    ReplyDelete
  14. David Heffernan I will look into that. Thanks for you time and help!

    ReplyDelete
  15. Krom Stern  Please post a link to the bug report here when you've submitted it on Quality Portal. Then I'll know that I don't need to do so! Thanks!

    ReplyDelete
  16. Roman Yankovsky  i just ordered it. How long does it usually take for the order to be processed?

    ReplyDelete
  17. Thomas Mueller First of all, thank you! Usually it's fast. You should have been already received a confirmation email with license key file attached. Please let me know if you didn't, I'll send it to you manually.

    ReplyDelete
  18. Roman Yankovsky I got the email more than half an hour ago, just didn't notice because I forgot that I had to use a different email account for purchasing (company policy). Sorry to bother you.

    ReplyDelete

Post a Comment