From 6e176bd6829e93776ba37ead39adc21c8a30ce6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Mon, 3 May 1999 23:57:18 +0000 Subject: [PATCH] typeck.c (string_conv_p): Use same_type_p to check whether we try to convert between char and wchar_t. * typeck.c (string_conv_p): Use same_type_p to check whether we try to convert between char and wchar_t. From-SVN: r26764 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/typeck.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) 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