From: Martin v. Löwis Date: Mon, 3 May 1999 23:57:18 +0000 (+0000) Subject: typeck.c (string_conv_p): Use same_type_p to check whether we try to convert between... X-Git-Tag: prereleases/gcc-2.95-test~638 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6e176bd6829e93776ba37ead39adc21c8a30ce6d;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 4c8551746f36..59c4a682fbc2 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 d65479b4033b..fd020511f5c7 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