2002-12-17 Jason Merrill <jason@redhat.com>
+ * tree.c (make_node): Don't set TREE_TYPE on 's' class nodes.
+ (build1): Always set TREE_SIDE_EFFECTS on 's' class nodes.
+
* gcc.c (do_spec_1) ['W']: End any pending argument from the braces.
* calls.c (expand_call): Don't try to be clever about expanding
{
case 's':
TREE_SIDE_EFFECTS (t) = 1;
- TREE_TYPE (t) = void_type_node;
break;
case 'd':
tree type;
tree node;
{
- int length;
+ int length = sizeof (struct tree_exp);
#ifdef GATHER_STATISTICS
tree_node_kind kind;
#endif
tree t;
#ifdef GATHER_STATISTICS
- if (TREE_CODE_CLASS (code) == 'r')
- kind = r_kind;
- else
- kind = e_kind;
+ switch (TREE_CODE_CLASS (code))
+ {
+ case 's': /* an expression with side effects */
+ kind = s_kind;
+ break;
+ case 'r': /* a reference */
+ kind = r_kind;
+ break;
+ default:
+ kind = e_kind;
+ break;
+ }
+
+ tree_node_counts[(int) kind]++;
+ tree_node_sizes[(int) kind] += length;
#endif
#ifdef ENABLE_CHECKING
abort ();
#endif /* ENABLE_CHECKING */
- length = sizeof (struct tree_exp);
-
t = ggc_alloc_tree (length);
memset ((PTR) t, 0, sizeof (struct tree_common));
-#ifdef GATHER_STATISTICS
- tree_node_counts[(int) kind]++;
- tree_node_sizes[(int) kind] += length;
-#endif
-
TREE_SET_CODE (t, code);
TREE_TYPE (t) = type;
TREE_READONLY (t) = TREE_READONLY (node);
}
- switch (code)
+ if (TREE_CODE_CLASS (code) == 's')
+ {
+ TREE_SIDE_EFFECTS (t) = 1;
+ }
+ else switch (code)
{
case INIT_EXPR:
case MODIFY_EXPR: