This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR preprocessor/42014
- From: Krzesimir Nowak <qdlacz at gmail dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Krzesimir Nowak <qdlacz at gmail dot com>
- Date: Mon, 20 Oct 2014 10:05:34 +0200
- Subject: Re: [PATCH] PR preprocessor/42014
- Authentication-results: sourceware.org; auth=none
- References: <1413666451-15144-1-git-send-email-qdlacz at gmail dot com>
2014-10-18 23:07 GMT+02:00 Krzesimir Nowak <qdlacz@gmail.com>:
> Hello.
>
> This is my first patch for GCC. I already started a paperwork for
> copyright assignment (sent an email to fsf-records at gnu org) -
> waiting for response.
>
> So, about this patch - it basically removes column printing from "In
> file included from ..." lines, as the column information always
> returned 0. Not sure if this is correct assumption - I tested only C
> and C++, so I don't know if other frontends (ada, go?) provide column
> information for include lines. Anyway, column information here is
> probably not useful.
>
> Or maybe it is, if GCC supports some language with include syntax like
> followish:
> #include <header_1.h>, <header_2.h>, <header_3.h>
>
> Maybe in this case printing column number has sense?
>
> I need help with testcase - I don't know how to implement it
> correctly. The output of compilation is something like this:
>
> In file included from .../pr42014-2.h:2,
> from .../pr42014-1.h:3,
> from .../pr42014.c:4:
> .../pr42014-3.h:1:7: error: 'foo' was not declared in this scope
>
> How to check the "from" lines? Is there some dg-foo (dg-grep?) command
> for it? dg-excess-errors is likely not suited for this purpose.
I suppose I will have to add a preprocessed file and try using dg-message.
>
> Also, do I need to run make -k check for both vanilla and changed GCC
> to compare the results? These tests take ages to complete, so maybe
> there is some subset of tests which is enough for regression checking
> in this case? Currently I am only running following command in gcc
> directory:
> make check-c++ RUNTESTFLAGS="-v dg.exp=cpp/pr42014.c"
>
> Krzesimir Nowak (1):
> Fix PR preprocessor/42014
>
> gcc/ChangeLog | 6 ++++++
> gcc/diagnostic.c | 27 +++++++++++++++------------
> gcc/testsuite/ChangeLog | 8 ++++++++
> gcc/testsuite/c-c++-common/cpp/pr42014-1.h | 3 +++
> gcc/testsuite/c-c++-common/cpp/pr42014-2.h | 2 ++
> gcc/testsuite/c-c++-common/cpp/pr42014-3.h | 1 +
> gcc/testsuite/c-c++-common/cpp/pr42014.c | 8 ++++++++
> 7 files changed, 43 insertions(+), 12 deletions(-)
> create mode 100644 gcc/testsuite/c-c++-common/cpp/pr42014-1.h
> create mode 100644 gcc/testsuite/c-c++-common/cpp/pr42014-2.h
> create mode 100644 gcc/testsuite/c-c++-common/cpp/pr42014-3.h
> create mode 100644 gcc/testsuite/c-c++-common/cpp/pr42014.c
>
> --
> 1.9.3
>