src/pic/glue.c (pic14printPublics): fix bitvars can't be public
authorbernhardheld <bernhardheld@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 26 Aug 2003 08:26:24 +0000 (08:26 +0000)
committerbernhardheld <bernhardheld@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 26 Aug 2003 08:26:24 +0000 (08:26 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2853 4a8a32a2-be11-0410-ad9d-d568d2c75423

ChangeLog
src/pic/glue.c

index 663cab9c7dc69bcc2300c7608e47ad0451085888..6d0d44725e4a770732b31bca8ce6ba4d314df6f5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2003-08-26  Bernhard Held <bernhard@bernhardheld.de>
+
+       pic patch provided by Slade Rich <slade_rich@yahoo.com>
+       * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
+       type for bits was changed. It resulted in bit variables becoming
+       global, which is not permitted in PIC 14 assembly output.
+
 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann@web.de>
 
        * doc/sdccman.lyx: various additions and updates. Rearranged sections
index 8a393a8c38c5f42d9d5ae2520ea955eb3fcd0716..03760ffd2837c565c232568fef151b84caad8dd9 100644 (file)
@@ -627,9 +627,10 @@ pic14printPublics (FILE * afile)
 
   for (sym = setFirstItem (publics); sym;
        sym = setNextItem (publics)) {
-    if(!IS_BITFIELD(sym->type) && ((IS_FUNC(sym->type) || sym->allocreq)))
-      fprintf (afile, "\tglobal %s\n", sym->rname);
-    else
+    if(!IS_BITFIELD(sym->type) && ((IS_FUNC(sym->type) || sym->allocreq))) {
+      if (!IS_BITVAR(sym->type))
+        fprintf (afile, "\tglobal %s\n", sym->rname);
+    } else
       fprintf (afile, ";\tglobal %s\n", sym->rname);
   }
 }