-//#define DEMAND_INTEGER_PROMOTION
-
-#ifdef DEMAND_INTEGER_PROMOTION
-
-/*-----------------------------------------------------------------*/
-/* walk a tree looking for the leaves. Add a typecast to the given */
-/* type to each value leaf node. */
-/*-----------------------------------------------------------------*/
-void
-pushTypeCastToLeaves (sym_link * type, ast * node, ast ** parentPtr)
-{
- if (!node || IS_CALLOP(node))
- {
- /* WTF? We should never get here. */
- return;
- }
-
- if (!node->left && !node->right)
- {
- /* We're at a leaf; if it's a value, apply the typecast */
- if (node->type == EX_VALUE && IS_INTEGRAL (TTYPE (node)))
- {
- *parentPtr = decorateType (newNode (CAST,
- newAst_LINK (copyLinkChain (type)),
- node));
- }
- }
- else
- {
- if (node->left)
- {
- pushTypeCastToLeaves (type, node->left, &(node->left));
- }
- if (node->right)
- {
- pushTypeCastToLeaves (type, node->right, &(node->right));
- }
- }
-}
-
-#endif
-