From unknown Sat Aug 16 20:56:39 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#10727 <10727@debbugs.gnu.org> To: bug#10727 <10727@debbugs.gnu.org> Subject: Status: 23.3; compilation-next-error misinterprets gcc errors with column info Reply-To: bug#10727 <10727@debbugs.gnu.org> Date: Sun, 17 Aug 2025 03:56:39 +0000 retitle 10727 23.3; compilation-next-error misinterprets gcc errors with co= lumn info reassign 10727 emacs submitter 10727 code@familjenjonsson.org severity 10727 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 04 15:33:27 2012 Received: (at submit) by debbugs.gnu.org; 4 Feb 2012 20:33:27 +0000 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 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 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 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: ** X-Spam-Status: No, score=2.4 required=5.0 tests=BAYES_00,NO_DNS_FOR_FROM, RCVD_IN_PBL, RCVD_IN_SORBS_DUL, RDNS_DYNAMIC, TO_NO_BRKTS_DYNIP autolearn=no version=3.3.2 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 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 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 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 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 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 From: code@familjenjonsson.org To: bug-gnu-emacs@gnu.org Subject: 23.3; compilation-next-error misinterprets gcc errors with column info Date: Sat, 04 Feb 2012 14:03:05 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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-Received-From: 140.186.70.17 X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: submit 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 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) 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=generic' '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) From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 04 16:07:06 2012 Received: (at 10727) by debbugs.gnu.org; 4 Feb 2012 21:07:06 +0000 Received: from localhost ([127.0.0.1]:54636 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rtmp8-0002eo-As for submit@debbugs.gnu.org; Sat, 04 Feb 2012 16:07:06 -0500 Received: from fencepost.gnu.org ([140.186.70.10]:41372 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rtmp5-0002eh-9f for 10727@debbugs.gnu.org; Sat, 04 Feb 2012 16:07:04 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RtmoP-0005EF-WF; Sat, 04 Feb 2012 16:06:22 -0500 From: Glenn Morris To: code@familjenjonsson.org Subject: Re: bug#10727: 23.3; compilation-next-error misinterprets gcc errors with column info References: X-Spook: csystems Commecen data haven constitution digicash Becker X-Ran: |~p]d_e_[n2|fF*oT{]0T->JSf*iZKwj,pB+p0%)r=Sm9rT\GHO_jOJHF:l*A7[TBlP2=+ X-Hue: green X-Debbugs-No-Ack: yes X-Attribution: GM Date: Sat, 04 Feb 2012 16:06:21 -0500 In-Reply-To: (code@familjenjonsson.org's message of "Sat, 04 Feb 2012 14:03:05 -0500") Message-ID: <3clioixq9e.fsf@fencepost.gnu.org> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 10727 Cc: 10727@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) code@familjenjonsson.org wrote: > 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. Thanks for the report. This is already fixed for Emacs 24.1. http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7806 You might like to try a pretest from alpha.gnu.org/gnu/emacs/pretest/ From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 04 16:07:47 2012 Received: (at control) by debbugs.gnu.org; 4 Feb 2012 21:07:47 +0000 Received: from localhost ([127.0.0.1]:54639 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rtmpn-0002fq-K6 for submit@debbugs.gnu.org; Sat, 04 Feb 2012 16:07:47 -0500 Received: from fencepost.gnu.org ([140.186.70.10]:41375 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rtmpm-0002fj-Bc for control@debbugs.gnu.org; Sat, 04 Feb 2012 16:07:46 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1Rtmp7-0005FH-RX for control@debbugs.gnu.org; Sat, 04 Feb 2012 16:07:05 -0500 Date: Sat, 04 Feb 2012 16:07:05 -0500 Message-Id: Subject: control message for bug 10727 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) unarchive 7806 forcemerge 7806 10727 From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 04 16:08:00 2012 Received: (at control) by debbugs.gnu.org; 4 Feb 2012 21:08:00 +0000 Received: from localhost ([127.0.0.1]:54642 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rtmpz-0002gH-T1 for submit@debbugs.gnu.org; Sat, 04 Feb 2012 16:08:00 -0500 Received: from fencepost.gnu.org ([140.186.70.10]:41376 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rtmpy-0002gA-Ji for control@debbugs.gnu.org; Sat, 04 Feb 2012 16:07:58 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RtmpK-0005Fd-6M for control@debbugs.gnu.org; Sat, 04 Feb 2012 16:07:18 -0500 Date: Sat, 04 Feb 2012 16:07:18 -0500 Message-Id: Subject: control message for bug 7806 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) fixed 7806 24.1 From unknown Sat Aug 16 20:56:39 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 04 Mar 2012 12:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator