mirror of
https://github.com/autc04/Retro68.git
synced 2024-12-24 02:29:55 +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 (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");
|
error_init ("char-array initialized from wide string");
|
||||||
return error_mark_node;
|
return error_mark_node;
|
||||||
@ -6561,7 +6561,7 @@ digest_init (location_t init_loc, tree type, tree init, tree origtype,
|
|||||||
}
|
}
|
||||||
else
|
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 "
|
error_init ("wide character array initialized from non-wide "
|
||||||
"string");
|
"string");
|
||||||
|
@ -970,7 +970,7 @@ digest_init_r (tree type, tree init, bool nested, int flags,
|
|||||||
|
|
||||||
if (TYPE_PRECISION (typ1) == BITS_PER_UNIT)
|
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)
|
if (complain & tf_error)
|
||||||
error ("char-array initialized from wide string");
|
error ("char-array initialized from wide string");
|
||||||
@ -979,7 +979,7 @@ digest_init_r (tree type, tree init, bool nested, int flags,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (char_type == char_type_node)
|
if (char_type == char_type_node || char_type == unsigned_char_type_node)
|
||||||
{
|
{
|
||||||
if (complain & tf_error)
|
if (complain & tf_error)
|
||||||
error ("int-array initialized from non-wide string");
|
error ("int-array initialized from non-wide string");
|
||||||
|
Loading…
Reference in New Issue
Block a user