This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH for more precise column numbers in C/C++ parsers
Joseph S. Myers wrote:
Please include something like this, but with each token in the function on
a separate line, as a testcase for both C and C++ that the diagnostics are
now on the desired tokens.
How about instead modifying existing tests by adding extra line breaks?
Assuming of course that the test passes with both --enable-mapped-location
and --disable-mapped-location. For example, gcc/testsuite/gcc.dg/decl-2.c.
The advantage is we test just as much without slowing down the testsuite.
(I don't think dejagnu can readily test the
column numbers, but by putting each token on a separate line you don't
need it to.)
Not quite. We'd test that the error/warning is attached to the correct
token, but we could still have of-by-one errors in the column numbers,
or have the column number rfer to tge end of the token rather than the
beginning.
Is the patch otherwise OK (at least the C front-end), assuming no regressions
of of course?
--
--Per Bothner
per@bothner.com http://per.bothner.com/