With today's trunk (4.9.0 20131106) the caret diagnostic always points to the first line, although the line number is correct. ====================== // First line int i = 0; int j = ; ====================== The above invalid code snippet produces the error message: ==================================================================== bug.cc:5:9: error: expected primary-expression before ';' token // First line ^ ====================================================================
With yesterday's build I got a correct diagnostic: ==================================================================== bug.cc:5:9: error: expected primary-expression before ';' token int j = ; ^ ====================================================================
It would be nice to have a few silly tests for caret diagnostics in the testsuite, but I think dejagnu was making this far from trivial. Perhaps things have improved since then.
Today I can't reproduce this. Please double check.
Appearantly got fixed meanwhile.
The offending patch got reverted: http://gcc.gnu.org/ml/gcc-cvs/2013-11/msg00212.html