public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] PR preprocessor/42014
@ 2014-10-18 21:07 Krzesimir Nowak
  2014-10-18 21:35 ` [PATCH] Fix " Krzesimir Nowak
  2014-10-20  8:09 ` [PATCH] " Krzesimir Nowak
  0 siblings, 2 replies; 4+ messages in thread
From: Krzesimir Nowak @ 2014-10-18 21:07 UTC (permalink / raw)
  To: gcc-patches; +Cc: Krzesimir Nowak

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.

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-10-20  8:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-18 21:07 [PATCH] PR preprocessor/42014 Krzesimir Nowak
2014-10-18 21:35 ` [PATCH] Fix " Krzesimir Nowak
2014-10-19 16:18   ` Joseph S. Myers
2014-10-20  8:09 ` [PATCH] " Krzesimir Nowak

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