GNU bug report logs - #17826
24.4.50; compile.el: gcc-include is now all INFO, not WARNING

Previous Next

Package: emacs;

Reported by: Dima Kogan <dima <at> secretsauce.net>

Date: Sat, 21 Jun 2014 08:49:02 UTC

Severity: minor

Tags: fixed, patch

Found in version 24.4.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 17826 in the body.
You can then email your comments to 17826 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#17826; Package emacs. (Sat, 21 Jun 2014 08:49:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dima Kogan <dima <at> secretsauce.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 21 Jun 2014 08:49:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Dima Kogan <dima <at> secretsauce.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.4.50; compile.el: gcc-include is now all INFO, not WARNING
Date: Sat, 21 Jun 2014 01:48:21 -0700
[Message part 1 (text/plain, inline)]
The attached patch changes the gcc-include type of "M-x compile" to be
INFO. Let's say I have 3 source files:

a.c:
#include "a.h"

a.h:
#include "b.h"

b.h:
asdf;


Clearly trying to compile a.c fails since b.h has an error. I do M-x
compile, and build with "gcc -c -o a.o a.c". I get a *compilation*
buffer with

 -*- mode: compilation; default-directory: "/tmp/" -*-
 Compilation started at Sat Jun 21 01:43:01

 gcc -c -o a.o a.c
 In file included from a.h:1:0,
                  from a.c:1:
 b.h:1:1: warning: data definition has no type or storage class [enabled by default]
  aadsf;
  ^

 Compilation finished at Sat Jun 21 01:43:01


Prior to this patch the line that contains "from a.h:1:0," was seen as
INFO and the line that contains "from a.c:1:" was seen as a
WARNING. This patch makes them both INFO.


[0001-gcc-include-compilation-lines-are-now-INFO-now-WARNI.patch (text/x-diff, inline)]
From 1a7756577d2c6bdeae0d9cea0098ed3b388b8036 Mon Sep 17 00:00:00 2001
From: Dima Kogan <dima <at> secretsauce.net>
Date: Sat, 21 Jun 2014 01:32:59 -0700
Subject: [PATCH] gcc-include compilation lines are now INFO, now WARNING

This patch changes the gcc-include type of "M-x compile" to be
INFO. Let's say I have 3 source files:

a.c:

a.h:

b.h:
asdf;

Clearly trying to compile a.c fails since b.h has an error. I do M-x
compile, and build with "gcc -c -o a.o a.c". I get a *compilation*
buffer with

 -*- mode: compilation; default-directory: "/tmp/" -*-
 Compilation started at Sat Jun 21 01:43:01

 gcc -c -o a.o a.c
 In file included from a.h:1:0,
                  from a.c:1:
 b.h:1:1: warning: data definition has no type or storage class [enabled by default]
  aadsf;
  ^

 Compilation finished at Sat Jun 21 01:43:01

Prior to this patch the line that contains "from a.h:1:0," was seen as
INFO and the line that contains "from a.c:1:" was seen as a
WARNING. This patch makes them both INFO.
---
 lisp/progmodes/compile.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 000d719..ea2bfc4 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -226,8 +226,8 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1))
     (gcc-include
      "^\\(?:In file included \\|                 \\|\t\\)from \
 \\([0-9]*[^0-9\n]\\(?:[^\n :]\\| [^-/\n]\\|:[^ \n]\\)*?\\):\
-\\([0-9]+\\)\\(?::\\([0-9]+\\)\\)?\\(?:\\(:\\)\\|\\(,\\|$\\)\\)?"
-     1 2 3 (4 . 5))
+\\([0-9]+\\)\\(?::\\([0-9]+\\)\\)?\\(?:\\([:,]\\|$\\)\\)?"
+     1 2 3 (nil . 4))
 
     (ruby-Test::Unit
      "^[\t ]*\\[\\([^\(].*\\):\\([1-9][0-9]*\\)\\(\\]\\)?:in " 1 2)
-- 
2.0.0


Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17826; Package emacs. (Sun, 04 Aug 2019 13:15:03 GMT) Full text and rfc822 format available.

Message #8 received at 17826 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Dima Kogan <dima <at> secretsauce.net>
Cc: 17826 <at> debbugs.gnu.org
Subject: Re: bug#17826: 24.4.50; compile.el: gcc-include is now all INFO,
 not WARNING
Date: Sun, 04 Aug 2019 14:33:42 +0200
Dima Kogan <dima <at> secretsauce.net> writes:

> The attached patch changes the gcc-include type of "M-x compile" to be
> INFO. Let's say I have 3 source files:
>
> a.c:
> #include "a.h"
>
> a.h:
> #include "b.h"
>
> b.h:
> asdf;
>
> Clearly trying to compile a.c fails since b.h has an error. I do M-x
> compile, and build with "gcc -c -o a.o a.c". I get a *compilation*
> buffer with
>
>  -*- mode: compilation; default-directory: "/tmp/" -*-
>  Compilation started at Sat Jun 21 01:43:01
>
>  gcc -c -o a.o a.c
>  In file included from a.h:1:0,
>                   from a.c:1:
>  b.h:1:1: warning: data definition has no type or storage class [enabled by default]
>   aadsf;
>   ^
>
>  Compilation finished at Sat Jun 21 01:43:01
>
> Prior to this patch the line that contains "from a.h:1:0," was seen as
> INFO and the line that contains "from a.c:1:" was seen as a
> WARNING. This patch makes them both INFO.

I think this makes a lot of sense, and I've tried the patch, and it
fixes this problem.  Does anybody object to making both those "included"
lines INFO instead of having one of them WARNING?

(The practical effect here is that `next-error' will skip INFO lines by
default.)

> -\\([0-9]+\\)\\(?::\\([0-9]+\\)\\)?\\(?:\\(:\\)\\|\\(,\\|$\\)\\)?"
> -     1 2 3 (4 . 5))
> +\\([0-9]+\\)\\(?::\\([0-9]+\\)\\)?\\(?:\\([:,]\\|$\\)\\)?"
> +     1 2 3 (nil . 4))

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) patch. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 04 Aug 2019 13:15:09 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17826; Package emacs. (Thu, 13 Aug 2020 10:23:01 GMT) Full text and rfc822 format available.

Message #13 received at 17826 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Dima Kogan <dima <at> secretsauce.net>
Cc: 17826 <at> debbugs.gnu.org
Subject: Re: bug#17826: 24.4.50; compile.el: gcc-include is now all INFO,
 not WARNING
Date: Thu, 13 Aug 2020 12:22:06 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> I think this makes a lot of sense, and I've tried the patch, and it
> fixes this problem.  Does anybody object to making both those "included"
> lines INFO instead of having one of them WARNING?
>
> (The practical effect here is that `next-error' will skip INFO lines by
> default.)

There was no response, so I've now gone ahead and applied the patch.
(I've not re-tested the test case since last year, but there doesn't
seem to have been many changes in this area since then, so I'm guessing
that this won't be a problem.)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 13 Aug 2020 10:23:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.1, send any further explanations to 17826 <at> debbugs.gnu.org and Dima Kogan <dima <at> secretsauce.net> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 13 Aug 2020 10:23:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 10 Sep 2020 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 282 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.