removed a fruitless attempt, compareType() should take care of this
authorjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Wed, 19 Sep 2001 10:56:05 +0000 (10:56 +0000)
committerjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Wed, 19 Sep 2001 10:56:05 +0000 (10:56 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1286 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/SDCCast.c
src/SDCCglue.c
src/SDCCmem.c

index d782ea75b9c3683dae646b76eb3a94ccab21441e..4d5c02a3ae3f5fe75f2caed974e3679db91094ca 100644 (file)
@@ -610,7 +610,6 @@ processParms (ast * func,
              int *parmNumber,
              bool rightmost)
 {
-  int castError=0;
   sym_link *fetype = func->etype;
 
   /* if none of them exist */
@@ -746,35 +745,7 @@ processParms (ast * func,
 
 
   /* the parameter type must be at least castable */
-  if (compareType (defParm->type, actParm->ftype) == 0)
-    {
-      castError++;
-    }
-
-#ifdef JWK20010916
-  if (!IS_SPEC(defParm->type) && !IS_SPEC(actParm->ftype)) {
-    // now we have two pointers, check if they point to the same
-    sym_link *dtype=defParm->type, *atype=actParm->ftype;
-    do {
-      dtype=dtype->next;
-      atype=atype->next;
-      if (
-         (dtype->next && !atype->next) ||
-         (!dtype->next && atype->next) ||
-         compareType (dtype, atype)!=1) {
-       castError++;
-      }
-    } while (dtype->next && atype->next);
-    if (IS_SPEC(dtype) && IS_SPEC(atype)) {
-      // ok so far, we have two etypes, they must have the same SCLASS
-      if (SPEC_SCLS(dtype)!=SPEC_SCLS(atype)) {
-       castError++;
-      }
-    }
-  }
-#endif
-
-  if (castError) {
+  if (compareType (defParm->type, actParm->ftype) == 0) {
     werror (W_INCOMPAT_CAST);
     fprintf (stderr, "type --> '");
     printTypeChain (actParm->ftype, stderr);
index b75c37ba866a17917f63f9fd270a8012856aeeca..c86f5843a2bda19f2dbadfc11610508c6b15888d 100644 (file)
@@ -377,7 +377,7 @@ initPointer (initList * ilist)
        }
  wrong:
        werror (W_INIT_WRONG);
-       return NULL;
+       return constVal("0");
 
 }
 
index e5f13fa4d19cea48d1fd65c84808ca5688377891..4692be48e609842c9020b1e5f950311272e2c707 100644 (file)
@@ -581,13 +581,6 @@ allocLocal (symbol * sym)
 
   /* this is automatic           */
 
-#ifdef JWK20010916
-  if (!IS_SPEC(sym->type) && SPEC_OCLS(sym->etype)) {
-    allocIntoSeg (sym);
-    return;
-  }
-#endif
-
   /* if it to be placed on the stack */
   if (options.stackAuto || reentrant) {
     sym->onStack = 1;