]> git.gag.com Git - fw/sdcc/blobdiff - src/SDCCsymt.c
fixed parms->ArgSym bug & type system bug
[fw/sdcc] / src / SDCCsymt.c
index e5fc5a66e7face3e94dca660fcd2dfa1d3a68741..2f1ba81a62160417e838af9daa66748cfddec5c8 100644 (file)
@@ -434,9 +434,10 @@ mergeSpec (sym_link * dest, sym_link * src)
   if (SPEC_NOUN (dest) != SPEC_NOUN (src) && !SPEC_NOUN (dest))
     SPEC_NOUN (dest) = SPEC_NOUN (src);
 
-  if (!SPEC_SCLS (dest))       /* if destination has no storage class */
+  /* if destination has no storage class */
+  if (!SPEC_SCLS (dest) || (SPEC_SCLS(dest) == S_CONSTANT && SPEC_SCLS (src)))
     SPEC_SCLS (dest) = SPEC_SCLS (src);
-
+  /* special case for const */
   /* copy all the specifications  */
   SPEC_LONG (dest) |= SPEC_LONG (src);
   SPEC_SHORT (dest) |= SPEC_SHORT (src);
@@ -1709,6 +1710,10 @@ isSymbolEqual (symbol * dest, symbol * src)
   return (!strcmp (dest->name, src->name));
 }
 
+void PT(sym_link *type)
+{
+       printTypeChain(type,0);
+}
 /*-----------------------------------------------------------------*/
 /* printTypeChain - prints the type chain in human readable form   */
 /*-----------------------------------------------------------------*/