From ca42bef026433540252eeae23b1dcf8fa5cd79d4 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Wed, 8 Nov 2017 12:47:09 -0500 Subject: [PATCH 19/25] {[10/14], approved} Handle location wrappers in string_conv_p gcc/cp/ChangeLog: * typeck.c (string_conv_p): Strip any location wrapper from "exp". --- gcc/cp/typeck.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index a503ebe..2490cb0 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -2149,6 +2149,8 @@ string_conv_p (const_tree totype, const_tree exp, int warn) && !same_type_p (t, wchar_type_node)) return 0; + STRIP_ANY_LOCATION_WRAPPER (exp); + if (TREE_CODE (exp) == STRING_CST) { /* Make sure that we don't try to convert between char and wide chars. */ -- 1.8.5.3