This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: question about illegal utf-8 encoding in string literals
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: "Blower, Melanie" <melanie dot blower at intel dot com>
- Cc: gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Wed, 6 Jul 2016 21:39:08 +0100
- Subject: Re: question about illegal utf-8 encoding in string literals
- Authentication-results: sourceware.org; auth=none
- References: <B3584E72CFEBED439A3ECA9BCE67A4EF403A6260@fmsmsx116.amr.corp.intel.com>
On 6 July 2016 at 19:38, Blower, Melanie wrote:
> Hello,
> I work for Intel on the Intel c++ compiler and we strive to be compatible with the gnu compiler.
> We are processing a source file assuming utf-8 encoding and we see a string literal with illegal utf-8 encoding, such as an 8-bit character with the high bit set like 0xa3.
> Testing shows that gcc is passes the illegal utf-8 character through without diagnostic message, as though it were an "extended ascii" character.
> I don't see a way to enable warnings for this issue.
> Please confirm that gcc handles illegal utf-8 encodings this way.
Hi, I don't know the answer, Joseph Myers is probably the right person
to ask, but I suspect that for a question like this you'll get a
better answer on the gcc@ list.