This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Help! Regarding bug 49973
- From: Manuel LÃpez-IbÃÃez <lopezibanez at gmail dot com>
- To: Prasad Ghangal <prasad dot ghangal at gmail dot com>, gcc at gcc dot gnu dot org
- Date: Thu, 4 Feb 2016 02:09:14 +0000
- Subject: Re: Help! Regarding bug 49973
- Authentication-results: sourceware.org; auth=none
- References: <CAE+uiWb7U8M+cmgg0CewmpOaDEoqc8JCPCMpCf64Tn8Cw-JHZA at mail dot gmail dot com>
On 03/02/16 21:01, Prasad Ghangal wrote:
Hi !
I am new to gcc. I would like to solve bug
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49973 (Bug 49973 - Column
numbers count special characters as multiple columns ). Can somebody
guide me?
I tried to debug gcc under gdb. I think I have to change code in c-parser.c
I think this should be fixed in libcpp, probably in lex.c, but maybe other
places also. A good testcase to start with would be:
/* Ã /* */
/* a /* */
cc1 -Wcomment
prog.cc:1:7: warning: "/*" within comment [-Wcomment]
/* Ã /* */
^
prog.cc:2:6: warning: "/*" within comment [-Wcomment]
/* a /* */
^
Both locations should point to column 6. Look for places where column info is
converted to source_location (linemap_position_for_column or
linemap_position_for_line_and_colum). Figure out where the column info got the
wrong value. Use something like wcwidth() to measure the width of non-ASCII
characters and get the right width of 'Ã'.
Unfortunately, GCC 6 seems to be broken for the above testcase
(https://gcc.gnu.org/PR69664). Revision 229665 seems fine.
Cheers,
Manuel.