------- Comment #2 from dseketel at redhat dot com 2008-06-16 11:13 ------- Created an attachment (id=15774) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15774&action=view) produce more accurate column information in error messages
This patch modifies the c++ parser to produce more accurate column information in error messages. The basic idea of the patch is to not use the global input_location variable to generate line/columns info in error messages, but rather to pass the right token location to each error message. For now, I have mostly touched only the parsing code. Semantic analysis code has not been touched yet. I have not touched warning generation code either. I have started to make the error tests in testsuite/g++.dg/parse/ be column aware by forcing the -fshow-column flag on these tests as well. It is looking good so far. I realised that -fno-show-column was forced in gcc/testsuite/lib/g++.exp. So I commented that so that -fshow-column flag can take effect when triggered. This patch is work in progress and I will update it here until it becomes solid enought to be posted to the gcc-patches mailing list. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31754