public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ethouris at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/65448] New: Allow for cascade includes in error messages
Date: Tue, 17 Mar 2015 09:26:00 -0000	[thread overview]
Message-ID: <bug-65448-4@http.gcc.gnu.org/bugzilla/> (raw)

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65448

            Bug ID: 65448
           Summary: Allow for cascade includes in error messages
           Product: gcc
           Version: 4.9.1
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ethouris at gmail dot com

When gcc reports a compile error that refers to a line in a file that is
included by another include file, which is finally included by the *.cpp file
being compiled, it reports the error more-less this way:

In file included from file1.h:10:1,
                 from file2.h:11:1,
                 from file.cpp:9:0:
file3.h:25:0: error: 'symbol' does not name a type

Most tools that use these error reports simply skip the first three lines, as
they do not look like "standard compiler error format". It would be nice to
have at least an option to change the format into something like this:

file1.h:10:1: note: In file included from here,
file2.h:11:1: note: from here,
file.cpp:9:0: note: from here,
file3.h:25:0: error: 'symbol' does not name a type

Some programming mistakes are very tough to determine without the cascade
include information (such as forgetting a semicolon in some declaration before
an #include directive).


             reply	other threads:[~2015-03-17  9:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-17  9:26 ethouris at gmail dot com [this message]
2015-03-26 15:43 ` [Bug c++/65448] " ethouris at gmail dot com
2015-03-26 15:52 ` schwab@linux-m68k.org
2015-03-26 16:09 ` manu at gcc dot gnu.org
2022-11-30 20:55 ` pinskia at gcc dot gnu.org

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

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

  git send-email \
    --in-reply-to=bug-65448-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.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.
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).