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:
parent
891febc6e1
commit
6e176bd682
2 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue