1) Port decides whether to handle GPOINTER unqualified pointers treated as port-...
authorsandeep <sandeep@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 18 Dec 2001 04:11:21 +0000 (04:11 +0000)
committersandeep <sandeep@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 18 Dec 2001 04:11:21 +0000 (04:11 +0000)
2) Port decides if the LabelKey will be reset to 1 after each functions (some assemblers don't like duplicate labels, even if they are local)

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1691 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/SDCCast.c

index b3cd43fb366fc314117cc80e7805a77fa7a84554..116ef2c63de01c455562be2854de0f3529af9a27 100644 (file)
@@ -617,7 +617,7 @@ funcOfTypeVarg (char *name, char * rtype, int nArgs , char **atypes)
 /*-----------------------------------------------------------------*/
 /* reverseParms - will reverse a parameter tree                    */
 /*-----------------------------------------------------------------*/
-void 
+static void 
 reverseParms (ast * ptree)
 {
   ast *ttree;
@@ -714,13 +714,13 @@ processParms (ast * func,
       if (IS_PTR(ftype) && !IS_GENPTR(ftype))
        {
          newType = newAst_LINK (copyLinkChain(ftype));
-         DCL_TYPE (newType->opval.lnk) = GPOINTER;
+         DCL_TYPE (newType->opval.lnk) = port->unqualified_pointer;
        }
 
       if (IS_AGGREGATE (ftype))
        {
          newType = newAst_LINK (copyLinkChain (ftype));
-         DCL_TYPE (newType->opval.lnk) = GPOINTER;
+         DCL_TYPE (newType->opval.lnk) = port->unqualified_pointer;
        }
       if (newType)
        {
@@ -4323,7 +4323,7 @@ skipall:
 
   /* we are done freeup memory & cleanup */
   noLineno--;
-  labelKey = 1;
+  if (port->reset_labelKey) labelKey = 1;
   name->key = 0;
   FUNC_HASBODY(name->type) = 1;
   addSet (&operKeyReset, name);