This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PR preprocessor/42014


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
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]