[Top][All Lists]

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

bug#6778: 24.0.50; compile-mode fails on gcc-4.5 error messages

From: Miles Bader
Subject: bug#6778: 24.0.50; compile-mode fails on gcc-4.5 error messages
Date: Mon, 02 Aug 2010 23:14:59 +0900

Emacs compile.el fails to parse correctly gcc 4.5 error messages that
include a column as well as a line number.

To reproduce, assuming gcc 4.5 is installed as "gcc-4.5":

(1) Put the following text into a file "x.c":

      int y = 1;
      int z = q1;
      int p = 1;

(2) Now compile by doing "M-x compile", and for a compilation command,
    use "gcc-4.5 -c x.c".

(3) The compiler will output an error message like:

      -*- mode: compilation; default-directory: "/tmp/" -*-
      Compilation started at Mon Aug  2 23:07:40

      gcc-4.5 -c x.c
      x.c:2:12: error: ‘q1’ undeclared here (not in a function)

      Compilation exited abnormally with code 1 at Mon Aug  2 23:07:40

(4) One should be able to jump to the error by giving the command
    `next-error' ("C-x `"); however next-error apparently is confused
    by the error, and instead gives a prompt like:

       Find this error in (default x.c:2): /tmp/

Apparently it fails to recognize the FILE:LINE:COL: format, and thinks
that ":2" is part of the filename.

My recollection is that such error messages used to be properly parsed
by next-error, so maybe some recent change has broken this.



In GNU Emacs (x86_64-unknown-linux-gnu, GTK+ Version 2.20.1)
 of 2010-07-31 on catnip
Windowing system distributor `The X.Org Foundation', version 11.0.10706901
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: ja_JP.UTF-8
  value of $XMODIFIERS: @im=SCIM
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Group

Minor modes in effect:
  gnus-topic-mode: t
  gnus-undo-mode: t
  rcirc-track-minor-mode: t
  minibuffer-electric-default-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  scroll-bar-mode: right
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
C-v C-g C-g C-x C-v / t m p / x . c <return> i n t 
SPC x SPC SPC <backspace> = SPC 1 ; C-a C-u 3 SPC C-e 
<return> C-p C-a C-k C-k C-y C-y C-y C-y C-y C-u C-p 
C-n C-e C-b C-b q C-x C-s C-a C-n C-n C-n C-n C-u C-p 
C-M-f C-f C-d y C-n C-b C-d z C-n C-b C-d p C-n C-b 
C-d q C-x C-s C-n C-n C-x C-e x . o <return> y e C-x 
C-e C-g C-/ C-x C-e C-a <escape> d <escape> d g c c 
SPC - c <return> C-x C-e M-p M-n <backspace> c <return> 
C-x C-n C-x C-e C-a M-f - 4 . 5 <return> C-x C-n C-g 
C-x C-g C-x C-e M-b M-b M-b M-b C-d 4 <return> C-x 
C-n C-g C-x s e d e l <return> c o m p i l e - m o 
d e SPC f a i l s SPC t o SPC u n d e r s t a n d SPC 
5 <backspace> g c c - 4 . 5 SPC e r r o 5 r SPC m <backspace> 
<backspace> <backspace> <backspace> r SPC m e s s a 
g e s <return> C-h v c o m i p l e <escape> h c o m 
p i l e SPC SPC C-u e r r o SPC r SPC C-g <escape> 
x c u s t o m z i e C-g C-x b <return> C-a C-p C-p 
C-k C-k C-n C-n C-n C-k C-k C-n C-n C-x C-s <escape> 
x C-g <escape> C-g C-x s C-a C-x k <return> C-x k <return> 
y e s <return> <escape> x r e p o r t - e m SPC <r

Recent messages:
byte-code: End of buffer
byte-code: End of buffer
Saving file /tmp/x.c...
Wrote /tmp/x.c
Ispell process killed

Load-path shadows:
None found.

(shadow emacsbug help-mode view warnings compile comint copyright
cc-mode cc-fonts cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars
cc-defs flyspell ispell pp gnus-fun qp flow-fill sort gnus-cite smiley
ansi-color mail-extr gnus-async gnus-bcklg face-remap gnus-dup gnus-ml
disp-table gnus-topic parse-time timezone byte-opt bytecomp byte-compile
nnml auth-source netrc gnus-delay gnus-draft gnus-agent gnus-srvr
gnus-score score-mode nnvirtual nntp gnus-cache gnus-msg gnus-art mm-uu
mml2015 epg-config mm-view smime password-cache dig mailcap gnus-sum
gnus-group gnus-undo nndraft nnmh nnoo nnmail mail-source format-spec
gnus-start gnus-spec gnus-int gnus-range gnus-win lua-mode-autoloads
package reporter server uniquify rcirc time-date ring minibuf-eldef gnus
gnus-ems nnheader gnus-util wid-edit cus-start cus-load derived advice
help-fns advice-preload easy-mmode message sendmail regexp-opt rfc822
mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mailabbrev mail-utils
gmm-utils mailheader japan-util tooltip ediff-hook vc-hooks
lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image fringe
lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar
mldrag mouse jit-lock font-lock syntax facemenu font-core frame cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese hebrew greek romanian slovak czech european ethiopic
indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple
abbrev loaddefs button minibuffer faces cus-face files text-properties
overlay md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind
dynamic-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty emacs)

The key to happiness
 is having dreams.      [from a fortune cookie]

reply via email to

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