diff options
author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-03-23 00:41:05 +0000 |
---|---|---|
committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-03-23 00:41:05 +0000 |
commit | 9308e976dc6e47b47a9e9102a3aba36a105d0667 (patch) | |
tree | 3588211f05cbc41af8eb3dfc8cba0426d5fc4960 /gcc/c-common.c | |
parent | 67e4b2eecddee5cec0514da00ef8268306d9d4df (diff) | |
download | gcc-9308e976dc6e47b47a9e9102a3aba36a105d0667.tar.gz |
* builtin.c (get_pointer_alignment): Use DECL_P and TYPE_P macros.
* c-common.c (decl_attributes,check_format_info,truthvalue_conversion,
c_get_alias_set): Likewise.
* c-decl.c (duplicate_decls): Likewise.
* c-typeck.c (default_conversion,build_unary_op): Likewise.
* calls.c (initialize_argument_information): Likewise.
* dwarf2out.c (decl_class_context,add_abstract_origin_attribute):
Likewise.
* dwarfout.c (decl_class_context,output_type): Likewise.
* expr.c (get_inner_reference): Likewise.
* fold-const.c (simple_operand_p,fold): Likewise.
* function.c (aggregate_value_p): Likewise.
* stmt.c (expand_asm_operands): Likewise.
* varasm.c (named_section): Likewise.
* call.c (check_dtor_name,build_new_method_call): Likewise.
* decl.c (push_class_binding,poplevel,pushtag,lookup_namespace_name,
make_typename_type,check_initializer,cp_finish_decl,xref_tag): Likewise.
* decl2.c (grokfield,build_expr_from_tree,build_expr_from_tree,
decl_namespace,arg_assoc_template_arg,arg_assoc,
validate_nonmember_using_decl,do_class_using_decl): Likewise.
* error.c (dump_template_argument,dump_expr,cp_file_of,cp_line_of,
args_to_string): Likewise.
* friend.c (is_friend): Likewise.
* lex.c (note_got_semicolon,note_list_got_semicolon,is_global): Likewise.
* method.c (build_overload_nested_name,build_overload_value,
build_qualified_name,build_qualified_name,hack_identifier): Likewise.
* parse.y (typename_sub,typename_sub1): Likewise.
* pt.c (push_inline_template_parms_recursive,check_template_shadow,
process_partial_specialization,convert_template_argument,
template_args_equal,add_pending_template,lookup_template_class,
for_each_template_parm_r,maybe_fold_nontype_arg,
tsubst,instantiate_template,type_unification_real,unify,
instantiate_pending_templates,set_mangled_name_for_template_decl):
Likewise.
* repo.c (repo_get_id,repo_template_used): Likewise.
* search.c (lookup_field_1): Likewise.
* tree.c (walk_tree,get_type_decl,cp_tree_equal,member_p): Likewise.
* xref.c (classname): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32698 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r-- | gcc/c-common.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c index 6410e895426..9ef9590ff9a 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -494,13 +494,13 @@ decl_attributes (node, attributes, prefix_attributes) if (attrtab_idx == 0) init_attributes (); - if (TREE_CODE_CLASS (TREE_CODE (node)) == 'd') + if (DECL_P (node)) { decl = node; type = TREE_TYPE (decl); is_type = TREE_CODE (node) == TYPE_DECL; } - else if (TREE_CODE_CLASS (TREE_CODE (node)) == 't') + else if (TYPE_P (node)) type = node, is_type = 1; #ifdef PRAGMA_INSERT_ATTRIBUTES @@ -1954,8 +1954,7 @@ check_format_info (info, params) && (TYPE_READONLY (cur_type) || (cur_param != 0 && (TREE_CODE_CLASS (TREE_CODE (cur_param)) == 'c' - || (TREE_CODE_CLASS (TREE_CODE (cur_param)) == 'd' - && TREE_READONLY (cur_param)))))) + || (DECL_P (cur_param) && TREE_READONLY (cur_param)))))) warning ("writing into constant object (arg %d)", arg_num); /* Check the type of the "real" argument, if there's a type we want. */ @@ -2882,7 +2881,7 @@ truthvalue_conversion (expr) case ADDR_EXPR: /* If we are taking the address of a external decl, it might be zero if it is weak, so we cannot optimize. */ - if (TREE_CODE_CLASS (TREE_CODE (TREE_OPERAND (expr, 0))) == 'd' + if (DECL_P (TREE_OPERAND (expr, 0)) && DECL_EXTERNAL (TREE_OPERAND (expr, 0))) break; @@ -3315,8 +3314,7 @@ c_get_alias_set (t) if (t == error_mark_node) return 0; - type = (TREE_CODE_CLASS (TREE_CODE (t)) == 't') - ? t : TREE_TYPE (t); + type = (TYPE_P (t)) ? t : TREE_TYPE (t); if (type == error_mark_node) return 0; |