mdt@CIS.OHIO-STATE.EDU (Michael Tiemann) (03/07/89)
Here are some minor patches to G++ 1.34.0 as it was this morning:
yahi% diff -c2 toplev.c~ toplev.c
*** toplev.c~ Mon Mar 6 01:09:45 1989
--- toplev.c Tue Mar 7 00:05:03 1989
***************
*** 1096,1100 ****
/* C++: don't write out static consts, unless we needed
to take their address for some reason. */
! && (! TREE_READONLY (decl) || TREE_ADDRESSABLE (decl)))
rest_of_decl_compilation (decl, 0, 1, 1);
if (TREE_CODE (decl) == FUNCTION_DECL
--- 1096,1102 ----
/* C++: don't write out static consts, unless we needed
to take their address for some reason. */
! && (! TREE_READONLY (decl)
! || TREE_PUBLIC (decl)
! || TREE_ADDRESSABLE (decl)))
rest_of_decl_compilation (decl, 0, 1, 1);
if (TREE_CODE (decl) == FUNCTION_DECL
yahi% diff -c2 cplus-typeck.c~ cplus-typeck.c
*** cplus-typeck.c~ Sun Mar 5 13:13:04 1989
--- cplus-typeck.c Tue Mar 7 00:05:00 1989
***************
*** 3803,3806 ****
--- 3803,3810 ----
return (integer_zerop (ifexp) ? op2 : op1);
+ if (TREE_READONLY (op1) && TREE_CODE (op1) == VAR_DECL)
+ op1 = decl_constant_value (op1);
+ if (TREE_READONLY (op2) && TREE_CODE (op2) == VAR_DECL)
+ op2 = decl_constant_value (op2);
return build (COND_EXPR, type1, ifexp, op1, op2);
}
yahi%
Apply them in good health!
Michael