aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/typeck2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/typeck2.c')
-rw-r--r--gcc/cp/typeck2.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c
index f0717f60884..3edf58313aa 100644
--- a/gcc/cp/typeck2.c
+++ b/gcc/cp/typeck2.c
@@ -555,13 +555,21 @@ digest_init (tree type, tree init, tree* tail)
if ((TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (string)))
!= char_type_node)
+ /* APPLE LOCAL begin Pascal strings 2001-07-05 zll */
+ && (TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (string)))
+ != unsigned_char_type_node)
+ /* APPLE LOCAL end Pascal strings 2001-07-05 zll */
&& TYPE_PRECISION (typ1) == BITS_PER_UNIT)
{
error ("char-array initialized from wide string");
return error_mark_node;
}
- if ((TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (string)))
+ /* APPLE LOCAL begin Pascal strings 2001-07-05 zll */
+ if (((TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (string)))
== char_type_node)
+ || (TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (string)))
+ == unsigned_char_type_node))
+ /* APPLE LOCAL end Pascal strings 2001-07-05 zll */
&& TYPE_PRECISION (typ1) != BITS_PER_UNIT)
{
error ("int-array initialized from non-wide string");