https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49973
Eric Gallager <egallager at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |egallager at gcc dot gnu.org See Also| |https://gcc.gnu.org/bugzill | |a/show_bug.cgi?id=69664 --- Comment #12 from Eric Gallager <egallager at gcc dot gnu.org> --- (In reply to Manuel López-Ibáñez from comment #11) > 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. Bug 69664 is fixed now.