This is the mail archive of the 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]

[PATCH] PR preprocessor/42014


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
#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.

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
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


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