git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4124
4a8a32a2-be11-0410-ad9d-
d568d2c75423
+2006-04-25 Bernhard Held <bernhard AT bernhardheld.de>
+
+ * src/SDCCast.c (decorateType): partial fix for RFE 1475769,
+ remove cast to same type
+
2006-04-24 Bernhard Held <bernhard AT bernhardheld.de>
Enabled VPATH feature: changed nearly all Makefiles (149 files).
changePointer(LTYPE(tree));
checkTypeSanity(LETYPE(tree), "(cast)");
+ /* if 'from' and 'to' are the same remove the superflous cast, */
+ /* this helps other optimizations */
+ if (compareTypeExact (LTYPE(tree), RTYPE(tree), -1) == 1)
+ {
+ return tree->right;
+ }
+
/* If code memory is read only, then pointers to code memory */
/* implicitly point to constants -- make this explicit */
{