]> git.gag.com Git - debian/cc1111/blobdiff - debian/patches/02_result_type_gptr
Imported Debian patch 2.9.0-5
[debian/cc1111] / debian / patches / 02_result_type_gptr
diff --git a/debian/patches/02_result_type_gptr b/debian/patches/02_result_type_gptr
new file mode 100644 (file)
index 0000000..3ec93da
--- /dev/null
@@ -0,0 +1,35 @@
+--- a/src/SDCCast.c
++++ b/src/SDCCast.c
+@@ -863,6 +863,8 @@
+       ftype = (*actParm)->ftype;
++      resultType = RESULT_TYPE_NONE;
++
+       /* If it's a char, upcast to int. */
+       if (IS_INTEGRAL (ftype)
+           && (getSize (ftype) < (unsigned) INTSIZE))
+@@ -874,12 +876,14 @@
+         {
+           newType = newAst_LINK (copyLinkChain(ftype));
+           DCL_TYPE (newType->opval.lnk) = port->unqualified_pointer;
++         resultType = RESULT_TYPE_GPTR;
+         }
+       if (IS_AGGREGATE (ftype))
+         {
+           newType = newAst_LINK (copyLinkChain (ftype));
+           DCL_TYPE (newType->opval.lnk) = port->unqualified_pointer;
++          resultType = RESULT_TYPE_GPTR;
+         }
+       if (newType)
+@@ -890,7 +894,7 @@
+           (*actParm)->filename = (*actParm)->right->filename;
+           (*actParm)->lineno = (*actParm)->right->lineno;
+-          decorateType (*actParm, RESULT_TYPE_NONE);
++          decorateType (*actParm, resultType);
+         }
+       return 0;
+     } /* vararg */