From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: code@familjenjonsson.org Newsgroups: gmane.emacs.bugs Subject: bug#10727: 23.3; compilation-next-error misinterprets gcc errors with column info Date: Sat, 04 Feb 2012 14:03:05 -0500 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1328387654 11563 80.91.229.3 (4 Feb 2012 20:34:14 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 4 Feb 2012 20:34:14 +0000 (UTC) To: 10727@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Feb 04 21:34:13 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RtmJJ-0007Ov-F7 for geb-bug-gnu-emacs@m.gmane.org; Sat, 04 Feb 2012 21:34:13 +0100 Original-Received: from localhost ([::1]:37925 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RtmJI-0005Ev-V9 for geb-bug-gnu-emacs@m.gmane.org; Sat, 04 Feb 2012 15:34:12 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:35557) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RtmIV-0005E0-Oz for bug-gnu-emacs@gnu.org; Sat, 04 Feb 2012 15:33:25 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RtmIU-0001Ls-Fy for bug-gnu-emacs@gnu.org; Sat, 04 Feb 2012 15:33:23 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50998) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RtmIU-0001Lo-Cy for bug-gnu-emacs@gnu.org; Sat, 04 Feb 2012 15:33:22 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1RtmJ8-0001t8-3h for bug-gnu-emacs@gnu.org; Sat, 04 Feb 2012 15:34:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: code@familjenjonsson.org Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Feb 2012 20:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 10727 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.13283876077215 (code B ref -1); Sat, 04 Feb 2012 20:34:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 4 Feb 2012 20:33:27 +0000 Original-Received: from localhost ([127.0.0.1]:54621 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RtmIY-0001sH-3N for submit@debbugs.gnu.org; Sat, 04 Feb 2012 15:33:27 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:48789) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RtlfM-0000tT-Pa for submit@debbugs.gnu.org; Sat, 04 Feb 2012 14:52:58 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rtlec-0000Gr-KH for submit@debbugs.gnu.org; Sat, 04 Feb 2012 14:52:11 -0500 Original-Received: from lists.gnu.org ([140.186.70.17]:53016) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rtlec-0000Gn-Ih for submit@debbugs.gnu.org; Sat, 04 Feb 2012 14:52:10 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:52133) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rtleb-0000Jf-CL for bug-gnu-emacs@gnu.org; Sat, 04 Feb 2012 14:52:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RtleY-0000GL-7Y for bug-gnu-emacs@gnu.org; Sat, 04 Feb 2012 14:52:09 -0500 Original-Received: from c-71-192-163-207.hsd1.nh.comcast.net ([71.192.163.207]:55594 helo=localhost.localdomain) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RtleX-0000G2-Gn for bug-gnu-emacs@gnu.org; Sat, 04 Feb 2012 14:52:06 -0500 Original-Received: from localhost.localdomain (krypton [127.0.0.1]) by localhost.localdomain (8.14.5/8.14.5) with ESMTP id q14J36gM005327 for ; Sat, 4 Feb 2012 14:03:06 -0500 Original-Received: (from patrik@localhost) by localhost.localdomain (8.14.5/8.14.5/Submit) id q14J351G005326; Sat, 4 Feb 2012 14:03:05 -0500 X-Authentication-Warning: localhost.localdomain: patrik set sender to patrik@krypton.i-did-not-set--mail-host-address--so-tickle-me using -f X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Mailman-Approved-At: Sat, 04 Feb 2012 15:33:24 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-Mailman-Approved-At: Sat, 04 Feb 2012 15:34:11 -0500 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:56493 Archived-At: Newer versions of gcc supply the column and line number of errors by default. This causes the next-error command to fail to interpret the filename in some cases. To replicate: * Create these files: test.cc which contains: #include "test.h" test.h which contains: calss a(); * M-x compile with an argument "g++ test.cc", using a version of gcc that outputs columns (4.5 and higher does for sure). * The compilation buffer will contain: -*- mode: compilation; default-directory: "/Users/patrik/" -*- Compilation started at Sat Feb 4 13:50:36 g++-fsf-4.6 test.cc In file included from test.cc:1:0: test.h:1:1: error: 'calss' does not name a type Compilation exited abnormally with code 1 at Sat Feb 4 13:50:36 * now do next-error (C-x `). The minibuffer will display: Find this error in (default test.cc:1): Expected behavior is that it will find the error in test.cc. Doing next-error again will correctly find the actual error at test.h:1. It seems to be only the "In file included from..." errors that are mis-parsed. I have tried to trace this in the debugger but have only gotten to the macro compilation-loop in the compilation-next-error function in compile.el. It seems the error is in how the properties are set in the compilation buffer, because apparently these functions only look at the test properties. A workaround is to use the argument -fno-show-column to gcc, but the column numbers are actually useful so it would be nice to have this work correctly. In GNU Emacs 23.3.1 (x86_64-redhat-linux-gnu, GTK+ Version 2.24.8) of 2012-01-13 on x86-04.phx2.fedoraproject.org Windowing system distributor `The X.Org Foundation', version 11.0.11003000 configured using `configure '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--program-prefix=' '--disable-dependency-tracking' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-dbus' '--with-gif' '--with-jpeg' '--with-png' '--with-rsvg' '--with-tiff' '--with-xft' '--with-xpm' '--with-x-toolkit=gtk' 'build_alias=x86_64-redhat-linux-gnu' 'host_alias=x86_64-redhat-linux-gnu' 'CFLAGS=-DMAIL_USE_LOCKF -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=gen eric' 'LDFLAGS=-Wl,-z,relro '' 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: C value of $XMODIFIERS: nil locale-coding-system: nil default enable-multibyte-characters: t Major mode: C++/l Minor modes in effect: tooltip-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t abbrev-mode: t Recent input: C-x c x c o m p i l e g + + SPC t e s t . c c C-x ` C-g x r e p o r t - e m a c s - b u g Recent messages: Loading /usr/share/emacs/site-lisp/site-start.d/focus-init.el (source)...done Loading /usr/share/emacs/site-lisp/site-start.d/php-mode-init.el (source)...done Loading /usr/share/emacs/site-lisp/site-start.d/rpm-spec-mode-init.el (source)...done For information about GNU Emacs and the GNU system, type C-h C-a. Loading vc-hg...done (No files need saving) Compilation exited abnormally with code 1 Quit Load-path shadows: None found. Features: (shadow sort mail-extr message sendmail ecomplete rfc822 mml mml-sec password-cache mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util netrc time-date mm-util mail-prsvr gmm-utils wid-edit mailheader canlock sha1 hex-util hashcash mail-utils emacsbug compile comint ring vc-hg cc-mode cc-fonts easymenu cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs regexp-opt tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd font-setting 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 system-font-setting font-render-setting gtk x-toolkit x multi-tty emacs)