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.
This commit is contained in:
Martin Liska 2022-05-10 09:45:16 +02:00
parent d469484610
commit 4b86508194
10 changed files with 18 additions and 18 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -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. */

View File

@ -30,7 +30,7 @@ struct ipa_dfs_info {
bool new_node;
bool on_stack;
struct cgraph_node* next_cycle;
PTR aux;
void *aux;
};

View File

@ -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);