#2073 Filter Comments ignores difference in C macro

open
nobody
5
2012-12-21
2011-08-26
No

WinMerge 2.12.4.0 Unicode

When comparing the two attached files with Filter Comments turned on, WinMerge reports the files to be identical. With Filter Comments turned off, WinMerge correctly detects the differences.

Paring the files down to only the macro definition makes eliminates the problem. Perhaps the Doxygen commands in the comment block are confusing the comment filter?

Discussion

  • David Shanks

    David Shanks - 2011-08-26

    Original file (cut down to more easily show the problem)

     
  • David Shanks

    David Shanks - 2011-08-26

    Modified file (cut down to more easily show the problem)

     
  • David Shanks

    David Shanks - 2011-08-26

    My WinMerge Options (for use if you have difficulty reproducing the bug)

     
  • Jozef Heinrich

    Jozef Heinrich - 2012-03-20

    I was able to reproduce the issue with code from svn revision #7570 and isolated the cause.

    When there is a character sequence "*/" (end comment) without previous sequence "/*" (start comment), the whole text before "*/" is considered a comment, which is not true

    Attached files <testfile1.h> and <testfile2.h> shows the cause of this issue.

     
  • Jozef Heinrich

    Jozef Heinrich - 2012-03-20

    I wonder how I can upload files here...

    content of <testfile1.h>
    -----------
    follows an end comment char sequence, which causes
    that whole previous text is considered a comment
    */
    -----------

    content of <testfile2.h>
    --------
    int b = 20; // difference

    follows an end comment char sequence, which causes that
    whole previous text is considered a comment
    */
    -------

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks