typeck.c (string_conv_p): Use same_type_p to check whether we try to convert between...
authorMartin v. Löwis <loewis@informatik.hu-berlin.de>
Mon, 3 May 1999 23:57:18 +0000 (23:57 +0000)
committerMartin v. Löwis <loewis@gcc.gnu.org>
Mon, 3 May 1999 23:57:18 +0000 (23:57 +0000)
* 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
gcc/cp/typeck.c

index 4c8551746f361e13f00c0f592c730c72f7cacc9d..59c4a682fbc2f3a46d3d23566167aaa8cb7eda87 100644 (file)
@@ -1,3 +1,8 @@
+1999-05-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
+
+       * 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  <mark@codesourcery.com>
 
        * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
index d65479b4033bfc1a3178b5a9cdf89f3032889b5e..fd020511f5c7e7c33e1cba694ecb5fba5f6a5209 100644 (file)
@@ -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