* src/SDCCglue.c (printIvalBitFields): fixed bug 1806631
authorMaartenBrock <MaartenBrock@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 24 Feb 2008 19:32:38 +0000 (19:32 +0000)
committerMaartenBrock <MaartenBrock@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 24 Feb 2008 19:32:38 +0000 (19:32 +0000)
* support/regression/tests/bitopcse.c: removed hc08 exception, see testfwk.h
* support/Util/MySystem.c (my_system): output errorcode when verbose,
  see bug 1533372

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

ChangeLog
src/SDCCglue.c
support/Util/MySystem.c
support/regression/tests/bitopcse.c

index de4bd271db3e3fbfa1f70803140ebdf5e1796447..c6ed9cd413aa93ccfb47f44fc495ab961ad31be9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,9 @@
 2008-02-24 Maarten Brock <sourceforge.brock AT dse.nl>
 
        * src/SDCCast.c (expandInlineFuncs): fixed bug 1875869
+       * src/SDCCglue.c (printIvalBitFields): fixed bug 1806631
+       * support/regression/tests/bitopcse.c: removed hc08 exception, see testfwk.h
+       * support/Util/MySystem.c (my_system): output errorcode when verbose
 
 2008-02-22 Philipp Klaus Krause <pkk AT spth.de>
 
index c35f114acd24e4477aa54cdc20ebf9e0b8922e91..af8c59999d4cccf236fc8c83a0e42e47d55b6404 100644 (file)
@@ -704,7 +704,7 @@ void printIvalBitFields(symbol **sym, initList **ilist, struct dbuf_s * oBuf)
           (IS_BITFIELD(lsym->next->type)) &&
           (SPEC_BSTR(lsym->next->etype)))) break;
     lsym = lsym->next;
-    lilist = lilist->next;
+    lilist = lilist ? lilist->next : NULL;
   } while (1);
   switch (size) {
   case 1:
@@ -714,9 +714,9 @@ void printIvalBitFields(symbol **sym, initList **ilist, struct dbuf_s * oBuf)
   case 2:
     dbuf_tprintf (oBuf, "\t!dw !constword\n",ival);
     break;
-  case 4: /* EEP: why is this db and not dw? */
-    dbuf_tprintf (oBuf, "\t!db  !constword,!constword\n",
-             (ival >> 8) & 0xffff, (ival & 0xffff));
+  case 4:
+    dbuf_tprintf (oBuf, "\t!dw  !constword,!constword\n",
+             (ival >> 16) & 0xffff, (ival & 0xffff));
     break;
   }
   *sym = lsym;
@@ -1531,7 +1531,8 @@ emitOverlay (struct dbuf_s * aBuf)
                        sym->rname,
                        SPEC_ADDR (sym->etype));
             }
-          else {
+          else
+            {
               int size = getSize(sym->type);
 
               if (size==0) {
index 089b6b55d6095c7ef50f311898778798560e93a2..6aec20f98e91b338e1592926bab4441e115cfcec 100644 (file)
@@ -321,6 +321,11 @@ my_system(const char *cmd)
   }
 
   e = system(cmdLine);
+
+  if (options.verboseExec && e) {
+      printf("+ %s returned errorcode %d\n", cmdLine, e);
+  }
+
   Safe_free(cmdLine);
 
   return e;
index c99fa0227ec89f241e93da871b933091dd880e8b..23f0571266a84c07092db7b8042186b91b7574cd 100644 (file)
@@ -16,7 +16,7 @@
 #  define UNSIGNED unsigned
 #endif
 
-#if defined(TYPE_bool) || defined(SDCC_hc08)
+#if defined(TYPE_bool)
 #  define _data
 #else
 #  define _data idata