[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-diffutils] New option for diff: ignore changes in ANSI C commen
From: |
Paul Eggert |
Subject: |
Re: [bug-diffutils] New option for diff: ignore changes in ANSI C comments |
Date: |
Mon, 30 Aug 2010 12:40:12 -0700 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.11) Gecko/20100713 Thunderbird/3.0.6 |
On 08/29/10 23:32, Piotr Stefaniak wrote:
> I needed an option to ignore changes in comments, so I made a patch
> and it seems to work. If it's ok, please apply it to the main source.
> The patch was made against diff 3.0.9-53de.
I have my doubts about this one. For one thing, it doesn't
parse ANSI C comments correctly, for example:
/* This is a valid C comment. What sort of address@hidden/
idiot committee designed this syntax? */
is a valid ANSI C comment. More generally, some C compilers
ignore white space at ends of lines and others don't, and this
affects backslash-newline processing and therefore affects the
boundaries of comments. My kneejerk reaction is that this is
a specialized swamp that diffutils should steer clear of.
It might be useful to have a more-general filtering option,
which allows users to specify arbitrary filters (as processes)
on the input files, before "diff" does its work. Then, you could
write your own process to remove comments.