emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] eliminate false positive in compile.el


From: Daniel Colascione
Subject: Re: [PATCH] eliminate false positive in compile.el
Date: Thu, 25 Mar 2010 15:49:19 -0400
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 3/25/10 3:24 PM, Stefan Monnier wrote:
>> -\[0-9]?\\(?:[^0-9\n]\\|$\\)\\|[0-9][0-9][0-9]\\)"
>> +\[0-9]?\\(?:[^0-9\n]\\)\\|[0-9][0-9][0-9]\\)"
> 
> which simplifies to
> 
> \[0-9]?[^0-9\n]\\|[0-9][0-9][0-9]\\)"

Right; I just figured I'd make the change minimal.

> 
> Could you give some rationale for this change other than just "eliminate
> false positive"?  I mean, someone went to the trouble to add the
> \\(?:...\\|$\\), so there should be a good reason to remove it,

Well, I prefer to not match "included from" lines from gcc, but with the
current gnu compile matcher, it's impossible not to do that. What these
lines all have in common is that they end with ":" or ":,". gnu doesn't
match the latter, but it does match the former, which is always the last
line before the real error message.

By removing |$, we prevent the gnu matcher from matching compile error
lines that appear to have an empty message, which fixes the above issue.
The gcc-include matcher does catch the "included from" lines if people
want to use it.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (Darwin)

iEYEARECAAYFAkurvj8ACgkQ17c2LVA10VtzqwCdH70b7c4C8PI16DNNBCh1fIm/
j9UAn365appc78wzgCaPB324IltUUk57
=U7eK
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]