From b5b328ee53c22cf854076ae07d5fd9c57f305c68 Mon Sep 17 00:00:00 2001 From: johanknol Date: Mon, 1 Oct 2001 09:49:15 +0000 Subject: [PATCH] fixed bug #466587 git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1334 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- src/SDCCicode.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/SDCCicode.c b/src/SDCCicode.c index e8d37a83..30bd5985 100644 --- a/src/SDCCicode.c +++ b/src/SDCCicode.c @@ -1602,7 +1602,7 @@ geniCodeCast (sym_link * type, operand * op, bool implicit) if (IS_INTEGRAL(optype)) { // maybe this is NULL, than it's ok. if (!(IS_LITERAL(optype) && (SPEC_CVAL(optype).v_ulong ==0))) { - if (IS_GENPTR(type)) { + if (!TARGET_IS_Z80 && !TARGET_IS_GBZ80 && IS_GENPTR(type)) { // no way to set the storage if (IS_LITERAL(optype)) { werror(E_LITERAL_GENERIC); @@ -1625,10 +1625,12 @@ geniCodeCast (sym_link * type, operand * op, bool implicit) } } } else { // from a pointer to a pointer - if (implicit) { // if not to generic, they have to match - if ((!IS_GENPTR(type) && (DCL_TYPE(optype) != DCL_TYPE(type)))) { - werror(E_INCOMPAT_PTYPES); - errors++; + if (!TARGET_IS_Z80 && !TARGET_IS_GBZ80) { + if (implicit) { // if not to generic, they have to match + if ((!IS_GENPTR(type) && (DCL_TYPE(optype) != DCL_TYPE(type)))) { + werror(E_INCOMPAT_PTYPES); + errors++; + } } } } -- 2.47.2