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
This commit is contained in:
Martin v. Löwis 1999-05-03 23:57:18 +00:00 committed by Martin v. Löwis
parent 891febc6e1
commit 6e176bd682
2 changed files with 6 additions and 1 deletions

View 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

View 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