On 11/16/18 4:00 AM, Jakub Jelinek wrote:
Hi!

The following two testcases, one is a regression from GCC 8 (introduced by
the constructor to STRING_CST optimization), the other seems to fail since
C++11 support has been introduced (but is accepted by clang++) fail,
because during parsing with processing_template_decl we end up with creating
a STRING_CST with type of {un,}signed char array and later during
instantiation digest_init_r rejects it, because it already has such a type
rather than what it expects (char array) and bogusly complains that it is a
wide string.

The following patch fixes that.

Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

2018-11-16  Jakub Jelinek  <ja...@redhat.com>

        PR c++/87476
        * typeck2.c (digest_init_r): Re-add handing of signed/unsigned char
        strings and add it to the initialization of wide array from non-wide
        string diagnostics too.

OK.

Jason

Reply via email to