diff options
author | Martin Liska <mliska@suse.cz> | 2022-05-10 09:45:16 +0200 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2022-05-10 12:27:08 +0200 |
commit | 4b86508194463b601000bfa779bce0834247c66c (patch) | |
tree | e4ab7b94d2a7522c9b22eaa999d6af3f4cedb390 | |
parent | d4694846102a9589558dd509ef70b7960063935d (diff) | |
download | gcc-4b86508194463b601000bfa779bce0834247c66c.zip gcc-4b86508194463b601000bfa779bce0834247c66c.tar.gz gcc-4b86508194463b601000bfa779bce0834247c66c.tar.bz2 |
Replace PTR with 'void *' in compiler.
gcc/ada/ChangeLog:
* gcc-interface/decl.cc (compare_field_bitpos): Use void *
instead PTR.
* gcc-interface/utils2.cc (compare_elmt_bitpos): Likewise.
gcc/ChangeLog:
* basic-block.h (struct basic_block_d): Use void *
instead PTR.
* cfgloop.h: Likewise.
* cgraph.h: Likewise.
* gengtype-state.cc (state_ident_by_name): Likewise.
(record_type): Likewise.
(read_state_already_seen_type): Likewise.
* gengtype.cc (dump_type): Likewise.
(input_file_by_name): Likewise.
(main): Likewise.
* ggc-common.cc (ggc_cleared_alloc_ptr_array_two_args): Likewise.
* ipa-utils.h (struct ipa_dfs_info): Likewise.
* plugin.cc (htab_hash_plugin): Likewise.
-rw-r--r-- | gcc/ada/gcc-interface/decl.cc | 4 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/utils2.cc | 2 | ||||
-rw-r--r-- | gcc/basic-block.h | 4 | ||||
-rw-r--r-- | gcc/cfgloop.h | 2 | ||||
-rw-r--r-- | gcc/cgraph.h | 4 | ||||
-rw-r--r-- | gcc/gengtype-state.cc | 6 | ||||
-rw-r--r-- | gcc/gengtype.cc | 6 | ||||
-rw-r--r-- | gcc/ggc-common.cc | 4 | ||||
-rw-r--r-- | gcc/ipa-utils.h | 2 | ||||
-rw-r--r-- | gcc/plugin.cc | 2 |
10 files changed, 18 insertions, 18 deletions
diff --git a/gcc/ada/gcc-interface/decl.cc b/gcc/ada/gcc-interface/decl.cc index 1c7a716..d52c4fb 100644 --- a/gcc/ada/gcc-interface/decl.cc +++ b/gcc/ada/gcc-interface/decl.cc @@ -224,7 +224,7 @@ static bool constructor_address_p (tree); static bool allocatable_size_p (tree, bool); static bool initial_value_needs_conversion (tree, tree); static tree update_n_elem (tree, tree, tree); -static int compare_field_bitpos (const PTR, const PTR); +static int compare_field_bitpos (const void *, const void *); static bool components_to_record (Node_Id, Entity_Id, tree, tree, int, bool, bool, bool, bool, bool, bool, bool, tree, tree *); @@ -7712,7 +7712,7 @@ field_has_variable_size (tree field) /* qsort comparer for the bit positions of two record components. */ static int -compare_field_bitpos (const PTR rt1, const PTR rt2) +compare_field_bitpos (const void *rt1, const void *rt2) { const_tree const field1 = * (const_tree const *) rt1; const_tree const field2 = * (const_tree const *) rt2; diff --git a/gcc/ada/gcc-interface/utils2.cc b/gcc/ada/gcc-interface/utils2.cc index e5cd856..76622da 100644 --- a/gcc/ada/gcc-interface/utils2.cc +++ b/gcc/ada/gcc-interface/utils2.cc @@ -1936,7 +1936,7 @@ build_call_raise_range (int msg, Node_Id gnat_node, char kind, for record components. */ static int -compare_elmt_bitpos (const PTR rt1, const PTR rt2) +compare_elmt_bitpos (const void *rt1, const void *rt2) { const constructor_elt * const elmt1 = (const constructor_elt *) rt1; const constructor_elt * const elmt2 = (const constructor_elt *) rt2; diff --git a/gcc/basic-block.h b/gcc/basic-block.h index 21a9b24..c9d1fc9 100644 --- a/gcc/basic-block.h +++ b/gcc/basic-block.h @@ -36,7 +36,7 @@ public: } insns; /* Auxiliary info specific to a pass. */ - PTR aux; + void *aux; /* Location of any goto implicit in the edge. */ location_t goto_locus; @@ -120,7 +120,7 @@ struct GTY((chain_next ("%h.next_bb"), chain_prev ("%h.prev_bb"))) basic_block_d vec<edge, va_gc> *succs; /* Auxiliary info specific to a pass. */ - PTR GTY ((skip (""))) aux; + void *GTY ((skip (""))) aux; /* Innermost loop containing the block. */ class loop *loop_father; diff --git a/gcc/cfgloop.h b/gcc/cfgloop.h index d2714e2..528b121 100644 --- a/gcc/cfgloop.h +++ b/gcc/cfgloop.h @@ -148,7 +148,7 @@ public: class loop *next; /* Auxiliary info specific to a pass. */ - PTR GTY ((skip (""))) aux; + void *GTY ((skip (""))) aux; /* The number of times the latch of the loop is executed. This can be an INTEGER_CST, or a symbolic expression representing the number of diff --git a/gcc/cgraph.h b/gcc/cgraph.h index 8c512b6..4be67e3 100644 --- a/gcc/cgraph.h +++ b/gcc/cgraph.h @@ -628,7 +628,7 @@ public: /* File stream where this node is being written to. */ struct lto_file_decl_data * lto_file_data; - PTR GTY ((skip)) aux; + void *GTY ((skip)) aux; /* Comdat group the symbol is in. Can be private if GGC allowed that. */ tree x_comdat_group; @@ -1895,7 +1895,7 @@ public: /* Additional information about an indirect call. Not cleared when an edge becomes direct. */ cgraph_indirect_call_info *indirect_info; - PTR GTY ((skip (""))) aux; + void *GTY ((skip (""))) aux; /* When equal to CIF_OK, inline this call. Otherwise, points to the explanation why function was not inlined. */ enum cgraph_inline_failed_t inline_failed; diff --git a/gcc/gengtype-state.cc b/gcc/gengtype-state.cc index dfd9ea5..2c7f642 100644 --- a/gcc/gengtype-state.cc +++ b/gcc/gengtype-state.cc @@ -313,7 +313,7 @@ fatal_reading_state (struct state_token_st* tok, const char*msg) static struct state_ident_st * state_ident_by_name (const char *name, enum insert_option optins) { - PTR *slot = NULL; + void **slot = NULL; int namlen = 0; struct state_ident_st *stid = NULL; @@ -1435,7 +1435,7 @@ static void read_state_common_type_content (type_p current); static void record_type (type_p type) { - PTR *slot; + void **slot; slot = htab_find_slot (state_seen_types, type, INSERT); gcc_assert (slot); @@ -1451,7 +1451,7 @@ read_state_already_seen_type (type_p *type) if (state_token_kind (t0) == STOK_INTEGER) { - PTR *slot = NULL; + void **slot = NULL; struct type loctype = { TYPE_SCALAR, 0, 0, 0, GC_UNUSED, {0} }; loctype.state_number = t0->stok_un.stok_num; diff --git a/gcc/gengtype.cc b/gcc/gengtype.cc index 793ebd7..e11da9e 100644 --- a/gcc/gengtype.cc +++ b/gcc/gengtype.cc @@ -4869,7 +4869,7 @@ static htab_t seen_types; static void dump_type (int indent, type_p t) { - PTR *slot; + void **slot; printf ("%*cType at %p: ", indent, ' ', (void *) t); if (t->kind == TYPE_UNDEFINED) @@ -5118,7 +5118,7 @@ static htab_t input_file_htab; input_file* input_file_by_name (const char* name) { - PTR* slot; + void ** slot; input_file* f = NULL; int namlen = 0; if (!name) @@ -5227,7 +5227,7 @@ main (int argc, char **argv) POS_HERE (do_scalar_typedef ("machine_mode", &pos)); POS_HERE (do_scalar_typedef ("fixed_size_mode", &pos)); POS_HERE (do_scalar_typedef ("CONSTEXPR", &pos)); - POS_HERE (do_typedef ("PTR", + POS_HERE (do_typedef ("void *", create_pointer (resolve_typedef ("void", &pos)), &pos)); #undef POS_HERE diff --git a/gcc/ggc-common.cc b/gcc/ggc-common.cc index 9d737d0..8b3389e 100644 --- a/gcc/ggc-common.cc +++ b/gcc/ggc-common.cc @@ -175,8 +175,8 @@ ggc_cleared_alloc_htab_ignore_args (size_t c ATTRIBUTE_UNUSED, void * ggc_cleared_alloc_ptr_array_two_args (size_t c, size_t n) { - gcc_assert (sizeof (PTR *) == n); - return ggc_cleared_vec_alloc<PTR *> (c); + gcc_assert (sizeof (void **) == n); + return ggc_cleared_vec_alloc<void **> (c); } /* These are for splay_tree_new_ggc. */ diff --git a/gcc/ipa-utils.h b/gcc/ipa-utils.h index dc6ba0d..3ca058c 100644 --- a/gcc/ipa-utils.h +++ b/gcc/ipa-utils.h @@ -30,7 +30,7 @@ struct ipa_dfs_info { bool new_node; bool on_stack; struct cgraph_node* next_cycle; - PTR aux; + void *aux; }; diff --git a/gcc/plugin.cc b/gcc/plugin.cc index cbe4b7e..17b33e4 100644 --- a/gcc/plugin.cc +++ b/gcc/plugin.cc @@ -128,7 +128,7 @@ static const char *str_license = "plugin_is_GPL_compatible"; structure to be inserted into the hash table. */ static hashval_t -htab_hash_plugin (const PTR p) +htab_hash_plugin (const void *p) { const struct plugin_name_args *plugin = (const struct plugin_name_args *) p; return htab_hash_string (plugin->base_name); |