Hi,
many times we copy code snippets from sources that change the
Unicode quotation marks ( “ ” ) rather than " ". For example
const std::string a_string(“Hello”);
That line looks innocent but causes gcc to say
xxxxx.cpp:4:1: error: stray ‘\342’ in program
const std::string a_string(“Hello”);
^
misleading the poor programmer with such error message and wrong
column. A quick Google search says there are 171,000 matches for "
error: stray ‘\342’ in program" which may show that this is a very
common issue.
I want to know if there is consensus to one of these solutions that I
can implement:
* improve the error message for the case of the Unicode quotes such
as adding "(seems Unicode quotes where used)"
* add a flag for a GNU extension so Unicode quotes are treated as
regular quotes
Feedback? I just don't want to waist time coding a solution that won't
be accepted.
Thanks,
Daniel.
--
Daniel F. Gutson
Chief Engineering Officer, SPD
San Lorenzo 47, 3rd Floor, Office 5
Córdoba, Argentina
Phone: +54 351 4217888 / +54 351 4218211
Skype: dgutson
LinkedIn: http://ar.linkedin.com/in/danielgutson