This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/31754] Include column number along line in error messages main.cpp:5:38
- From: "dseketel at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Jun 2008 11:13:38 -0000
- Subject: [Bug other/31754] Include column number along line in error messages main.cpp:5:38
- References: <bug-31754-13581@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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