This is the mail archive of the
mailing list for the GCC project.
[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: Sat, 18 Oct 2014 23:07:30 +0200
- Subject: [PATCH] PR preprocessor/42014
- Authentication-results: sourceware.org; auth=none
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,
.../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