diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 4c8551746f3..59c4a682fbc 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +1999-05-04 Martin von Löwis + + * typeck.c (string_conv_p): Use same_type_p to check whether we + try to convert between char and wchar_t. + 1999-05-03 Mark Mitchell * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index d65479b4033..fd020511f5c 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -1886,7 +1886,7 @@ string_conv_p (totype, exp, warn) if (TREE_CODE (exp) == STRING_CST) { /* Make sure that we don't try to convert between char and wchar_t. */ - if (TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (exp))) != t) + if (!same_type_p (TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (exp))), t)) return 0; } else