GNU bug report logs -
#8866
23.3.50; flymake-mode colors warnings as errors
Previous Next
Reported by: Reuben Thomas <rrt <at> sc3d.org>
Date: Tue, 14 Jun 2011 19:36:02 UTC
Severity: normal
Found in version 23.3.50
Fixed in version 24.1
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 8866 <at> debbugs.gnu.org (full text, mbox):
Reuben Thomas wrote:
> In emacs -Q, I visit a C file, M-x flymake-mode, and introduce a
> warning-inducing problem. The background of the line goes pink, which is
> the error face, not the warning face.
Crystal ball says:
You are using gcc 4.5 or later. Your warnings look like:
go.c:4:4: warning: 'a' is used uninitialized in this function
rather than:
go.c:4: warning: 'a' is used uninitialized in this function
Ie, they include a column number.
Due to the silly way this works, patching the "ant/javac" regexp in
flymake.el may fix this:
*** lisp/progmodes/flymake.el 2011-01-02 23:50:46 +0000
--- lisp/progmodes/flymake.el 2011-06-15 07:28:54 +0000
***************
*** 918,925 ****
;; PHP
("\\(?:Parse\\|Fatal\\) error: \\(.*\\) in \\(.*\\) on line \\([0-9]+\\)" 2 3 nil 1)
;; LaTeX warnings (fileless) ("\\(LaTeX \\(Warning\\|Error\\): .*\\) on input line \\([0-9]+\\)" 20 3 nil 1)
! ;; ant/javac
! (" *\\(\\[javac\\] *\\)?\\(\\([a-zA-Z]:\\)?[^:(\t\n]+\\)\:\\([0-9]+\\)\:[ \t\n]*\\(.+\\)"
2 4 nil 5))
;; compilation-error-regexp-alist)
(flymake-reformat-err-line-patterns-from-compile-el compilation-error-regexp-alist-alist))
--- 918,925 ----
;; PHP
("\\(?:Parse\\|Fatal\\) error: \\(.*\\) in \\(.*\\) on line \\([0-9]+\\)" 2 3 nil 1)
;; LaTeX warnings (fileless) ("\\(LaTeX \\(Warning\\|Error\\): .*\\) on input line \\([0-9]+\\)" 20 3 nil 1)
! ;; ant/javac. Note this also matches gcc warnings!
! (" *\\(\\[javac\\] *\\)?\\(\\([a-zA-Z]:\\)?[^:(\t\n]+\\)\:\\([0-9]+\\)\\(?:\:[0-9]+\\)?\:[ \t\n]*\\(.+\\)"
2 4 nil 5))
;; compilation-error-regexp-alist)
(flymake-reformat-err-line-patterns-from-compile-el compilation-error-regexp-alist-alist))
This bug report was last modified 14 years and 26 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.