* src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
[fw/sdcc] / src / SDCCsymt.c
index 09611d190f955e89ed3fcc7c52e0c6263f6856e2..ed9c4fb5bfef072be5a6be12c3b4123861881872 100644 (file)
@@ -1173,10 +1173,17 @@ checkSClass (symbol * sym, int isProto)
     }
   
   /* if absolute address given then it mark it as
-     volatile */
-  if (IS_ABSOLUTE (sym->etype))
-    SPEC_VOLATILE (sym->etype) = 1;
+     volatile -- except in the PIC port */
+
+#if !OPT_DISABLE_PIC
+  /* The PIC port uses a different peep hole optimizer based on "pCode" */
+  if (!TARGET_IS_PIC)
+#endif
+
+    if (IS_ABSOLUTE (sym->etype))
+      SPEC_VOLATILE (sym->etype) = 1;
   
+
   /* global variables declared const put into code */
   /* if no other storage class specified */
   if (sym->level == 0 &&
@@ -2023,7 +2030,11 @@ printTypeChain (sym_link * start, FILE * of)
              fprintf (of, "unkown * ");
              break;
            case ARRAY:
-             fprintf (of, "[] ");
+             if (DCL_ELEM(type)) {
+               fprintf (of, "[%d] ", DCL_ELEM(type));
+             } else {
+               fprintf (of, "[] ");
+             }
              break;
            }
        }
@@ -2454,7 +2465,8 @@ sym_link *typeFromStr (char *s)
            s++;
            break;
        default:
-           werror(E_INTERNAL_ERROR,"typeFromStr");
+           werror(E_INTERNAL_ERROR, __FILE__, __LINE__, 
+                  "typeFromStr: unknown type");
            break;
        }
        if (IS_SPEC(r) && usign) {
@@ -2500,7 +2512,7 @@ initCSupport ()
 
   for (bwd = 0; bwd < 3; bwd++)
     {
-      sym_link *l;
+      sym_link *l = NULL;
       switch (bwd)
        {
        case 0: