Commit 3fa8871b by Marek Polacek Committed by Marek Polacek

c-common.c: Use NULL_TREE instead of 0 where appropriate.

	* c-common.c: Use NULL_TREE instead of 0 where appropriate.
	* c-warn.c: Likewise.

	* c-decl.c: Use NULL_TREE instead of 0 where appropriate.
	* c-typeck.c: Likewise.

From-SVN: r248161
parent 26bddba3
2017-05-17 Marek Polacek <polacek@redhat.com>
* c-common.c: Use NULL_TREE instead of 0 where appropriate.
* c-warn.c: Likewise.
2017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com> 2017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
Implement new C++ intrinsics __is_assignable and __is_constructible. Implement new C++ intrinsics __is_assignable and __is_constructible.
......
...@@ -2989,7 +2989,7 @@ shorten_compare (location_t loc, tree *op0_ptr, tree *op1_ptr, ...@@ -2989,7 +2989,7 @@ shorten_compare (location_t loc, tree *op0_ptr, tree *op1_ptr,
if (!real1 && !real2 && integer_zerop (primop1) if (!real1 && !real2 && integer_zerop (primop1)
&& TYPE_UNSIGNED (*restype_ptr)) && TYPE_UNSIGNED (*restype_ptr))
{ {
tree value = 0; tree value = NULL_TREE;
/* All unsigned values are >= 0, so we warn. However, /* All unsigned values are >= 0, so we warn. However,
if OP0 is a constant that is >= 0, the signedness of if OP0 is a constant that is >= 0, the signedness of
the comparison isn't an issue, so suppress the the comparison isn't an issue, so suppress the
...@@ -3022,7 +3022,7 @@ shorten_compare (location_t loc, tree *op0_ptr, tree *op1_ptr, ...@@ -3022,7 +3022,7 @@ shorten_compare (location_t loc, tree *op0_ptr, tree *op1_ptr,
break; break;
} }
if (value != 0) if (value != NULL_TREE)
{ {
/* Don't forget to evaluate PRIMOP0 if it has side effects. */ /* Don't forget to evaluate PRIMOP0 if it has side effects. */
if (TREE_SIDE_EFFECTS (primop0)) if (TREE_SIDE_EFFECTS (primop0))
...@@ -4651,10 +4651,10 @@ self_promoting_args_p (const_tree parms) ...@@ -4651,10 +4651,10 @@ self_promoting_args_p (const_tree parms)
if (type == error_mark_node) if (type == error_mark_node)
continue; continue;
if (TREE_CHAIN (t) == 0 && type != void_type_node) if (TREE_CHAIN (t) == NULL_TREE && type != void_type_node)
return 0; return 0;
if (type == 0) if (type == NULL_TREE)
return 0; return 0;
if (TYPE_MAIN_VARIANT (type) == float_type_node) if (TYPE_MAIN_VARIANT (type) == float_type_node)
...@@ -5579,7 +5579,7 @@ check_function_arguments_recurse (void (*callback) ...@@ -5579,7 +5579,7 @@ check_function_arguments_recurse (void (*callback)
format_num = tree_to_uhwi (format_num_expr); format_num = tree_to_uhwi (format_num_expr);
for (inner_arg = first_call_expr_arg (param, &iter), i = 1; for (inner_arg = first_call_expr_arg (param, &iter), i = 1;
inner_arg != 0; inner_arg != NULL_TREE;
inner_arg = next_call_expr_arg (&iter), i++) inner_arg = next_call_expr_arg (&iter), i++)
if (i == format_num) if (i == format_num)
{ {
......
...@@ -1078,7 +1078,7 @@ match_case_to_enum_1 (tree key, tree type, tree label) ...@@ -1078,7 +1078,7 @@ match_case_to_enum_1 (tree key, tree type, tree label)
else else
print_hex (key, buf); print_hex (key, buf);
if (TYPE_NAME (type) == 0) if (TYPE_NAME (type) == NULL_TREE)
warning_at (DECL_SOURCE_LOCATION (CASE_LABEL (label)), warning_at (DECL_SOURCE_LOCATION (CASE_LABEL (label)),
warn_switch ? OPT_Wswitch : OPT_Wswitch_enum, warn_switch ? OPT_Wswitch : OPT_Wswitch_enum,
"case value %qs not in enumerated type", "case value %qs not in enumerated type",
......
2017-05-17 Marek Polacek <polacek@redhat.com> 2017-05-17 Marek Polacek <polacek@redhat.com>
* c-decl.c: Use NULL_TREE instead of 0 where appropriate.
* c-typeck.c: Likewise.
2017-05-17 Marek Polacek <polacek@redhat.com>
PR sanitizer/80659 PR sanitizer/80659
* c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
DECL_IGNORED_P even for non-static compound literals. DECL_IGNORED_P even for non-static compound literals.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment