On Mon, Jul 27, 2020 at 04:12:09PM +0200, Martin Liška wrote: > On 7/27/20 3:16 PM, Jakub Jelinek wrote: > > On Mon, Jul 27, 2020 at 02:32:15PM +0200, Martin Liška wrote: > > > As mentioned in the PR, we should not create a string constant for a type > > > that is different from char_type_node. Looking at expr.c, I was inspired > > > and used 'TYPE_MAIN_VARIANT (chartype) == char_type_node' to verify that > > > underlying > > > type is a character type. > > > > That doesn't look correct, there is char, signed char, unsigned char, > > or say std::byte, and all of them are perfectly fine. > > So, rather than requiring it is char and nothing else, you should instead > > check that it is an INTEGRAL_TYPE_P (maybe better other than BOOLEAN_TYPE?), > > which is complete and has the same TYPE_PRECISION as char_type_node. > > All right, the following survives tests and bootstraps.
LGTM. Jakub