unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Dima Kogan <dima@secretsauce.net>
To: 17826@debbugs.gnu.org
Subject: bug#17826: 24.4.50; compile.el: gcc-include is now all INFO, not WARNING
Date: Sat, 21 Jun 2014 01:48:21 -0700	[thread overview]
Message-ID: <87simy7ine.fsf@secretsauce.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 817 bytes --]

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.



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gcc-include-compilation-lines-are-now-INFO-now-WARNI.patch --]
[-- Type: text/x-diff, Size: 1745 bytes --]

From 1a7756577d2c6bdeae0d9cea0098ed3b388b8036 Mon Sep 17 00:00:00 2001
From: Dima Kogan <dima@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


             reply	other threads:[~2014-06-21  8:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-21  8:48 Dima Kogan [this message]
2019-08-04 12:33 ` bug#17826: 24.4.50; compile.el: gcc-include is now all INFO, not WARNING Lars Ingebrigtsen
2020-08-13 10:22   ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87simy7ine.fsf@secretsauce.net \
    --to=dima@secretsauce.net \
    --cc=17826@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).