mirror of
https://github.com/autc04/Retro68.git
synced 2024-12-23 10:31:22 +00:00
Make pascal strings work in initializers
This commit is contained in:
parent
5426b3a741
commit
e004916be5
@ -6553,7 +6553,7 @@ digest_init (location_t init_loc, tree type, tree init, tree origtype,
|
||||
|
||||
if (char_array)
|
||||
{
|
||||
if (typ2 != char_type_node)
|
||||
if (typ2 != char_type_node && typ2 != unsigned_char_type_node)
|
||||
{
|
||||
error_init ("char-array initialized from wide string");
|
||||
return error_mark_node;
|
||||
@ -6561,7 +6561,7 @@ digest_init (location_t init_loc, tree type, tree init, tree origtype,
|
||||
}
|
||||
else
|
||||
{
|
||||
if (typ2 == char_type_node)
|
||||
if (typ2 == char_type_node || typ2 == unsigned_char_type_node)
|
||||
{
|
||||
error_init ("wide character array initialized from non-wide "
|
||||
"string");
|
||||
|
@ -970,7 +970,7 @@ digest_init_r (tree type, tree init, bool nested, int flags,
|
||||
|
||||
if (TYPE_PRECISION (typ1) == BITS_PER_UNIT)
|
||||
{
|
||||
if (char_type != char_type_node)
|
||||
if (char_type != char_type_node && char_type != unsigned_char_type_node)
|
||||
{
|
||||
if (complain & tf_error)
|
||||
error ("char-array initialized from wide string");
|
||||
@ -979,7 +979,7 @@ digest_init_r (tree type, tree init, bool nested, int flags,
|
||||
}
|
||||
else
|
||||
{
|
||||
if (char_type == char_type_node)
|
||||
if (char_type == char_type_node || char_type == unsigned_char_type_node)
|
||||
{
|
||||
if (complain & tf_error)
|
||||
error ("int-array initialized from non-wide string");
|
||||
|
Loading…
Reference in New Issue
Block a user