PR c++/61339 - add mismatch between struct and class [-Wmismatched-tags] to non-bugs

gcc/c/ChangeLog:

	PR c++/61339
	* c-decl.c: Change class-key from class to struct and vice versa
	to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
	* gimple-parser.c: Same.

gcc/c-family/ChangeLog:

	PR c++/61339
	* c-format.c (check_argument_type): Change class-key from class to
	struct and vice versa to match convention and avoid -Wclass-is-pod
	and -Wstruct-no-pod.
	* c-pretty-print.h: Same.

gcc/cp/ChangeLog:

	PR c++/61339
	* constexpr.c (cxx_eval_call_expression): Change class-key from class
	to struct and vice versa to match convention and avoid -Wclass-is-pod
	and -Wstruct-no-pod.
	* constraint.cc (get_concept_definition): Same.
	* cp-tree.h: Same.
	* cxx-pretty-print.h: Same.
	* error.c: Same.
	* logic.cc (term_list::replace): Same.
	* name-lookup.c (find_local_binding): Same.
	* pt.c (tsubst_binary_right_fold): Same.
	* search.c (field_accessor_p): Same.
	* semantics.c (expand_or_defer_fn): Same.

gcc/lto/ChangeLog:

	PR c++/61339
	* lto-dump.c: Change class-key from classi to struct and vice versa
	to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.

gcc/ChangeLog:

	PR c++/61339
	* align.h: Change class-key from class to struct and vice versa
	to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
	* alloc-pool.h: Same.
	* asan.c (shadow_mem_size): Same.
	* auto-profile.c: Same.
	* basic-block.h: Same.
	* bitmap.h: Same.
	* cfgexpand.c (set_rtl): Same.
	(expand_one_stack_var_at): Same.
	* cfghooks.h: Same.
	* cfgloop.h: Same.
	* cgraph.h: Same.
	* config/i386/i386.h: Same.
	* df-problems.c (df_print_bb_index): Same.
	* df-scan.c: Same.
	* df.h (df_single_use): Same.
	* diagnostic-show-locus.c (layout::print_annotation_line): Same.
	(layout::annotation_line_showed_range_p): Same.
	(get_printed_columns): Same.
	(correction::ensure_terminated): Same.
	(line_corrections::~line_corrections): Same.
	* dojump.h: Same.
	* dse.c: Same.
	* dump-context.h: Same.
	* dumpfile.h: Same.
	* dwarf2out.c: Same.
	* edit-context.c: Same.
	* fibonacci_heap.c (test_union_of_equal_heaps): Same.
	* flags.h: Same.
	* function.c (assign_stack_local): Same.
	* function.h: Same.
	* gcc.c: Same.
	* gcov.c (block_info::block_info): Same.
	* genattrtab.c: Same.
	* genextract.c: Same.
	* genmatch.c (comparison_code_p): Same.
	(id_base::id_base): Same.
	(decision_tree::print): Same.
	* genoutput.c: Same.
	* genpreds.c (write_one_predicate_function): Same.
	* genrecog.c (validate_pattern): Same.
	(find_operand_positions): Same.
	(optimize_subroutine_group): Same.
	(merge_pattern_transition::merge_pattern_transition): Same.
	(merge_pattern_info::merge_pattern_info): Same.
	(merge_state_result::merge_state_result): Same.
	(merge_into_state): Same.
	* gensupport.c: Same.
	* gensupport.h: Same.
	* ggc-common.c (init_ggc_heuristics): Same.
	* ggc-tests.c (test_union): Same.
	* gimple-loop-interchange.cc (dump_induction): Same.
	* gimple-loop-versioning.cc: Same.
	* gimple-match.h (gimple_match_cond::any_else): Same.
	* gimple-ssa-backprop.c: Same.
	* gimple-ssa-sprintf.c: Same.
	* gimple-ssa-store-merging.c (store_operand_info::store_operand_info): Same.
	(store_immediate_info::store_immediate_info): Same.
	(merged_store_group::apply_stores): Same.
	(get_location_for_stmts): Same.
	* gimple-ssa-strength-reduction.c: Same.
	* gimple-ssa-warn-alloca.c: Same.
	* gimple-ssa-warn-restrict.c (pass_wrestrict::execute): Same.
	* godump.c (go_type_decl): Same.
	* hash-map-tests.c (test_map_of_strings_to_int): Same.
	* hash-map.h: Same.
	* hash-set-tests.c (test_set_of_strings): Same.
	* hsa-brig.c: Same.
	* hsa-common.h: Same.
	* hsa-gen.c (transformable_switch_to_sbr_p): Same.
	* input.c (assert_loceq): Same.
	* input.h: Same.
	* ipa-cp.c: Same.
	* ipa-devirt.c (possible_polymorphic_call_targets_1): Same.
	* ipa-fnsummary.h: Same.
	* ipa-inline.h: Same.
	* ipa-prop.h: Same.
	* ipa-split.c (visit_bb): Same.
	* ira-int.h (minmax_set_iter_next): Same.
	* loop-invariant.c: Same.
	* loop-iv.c: Same.
	* lra-eliminations.c: Same.
	* lra-int.h: Same.
	* lra-lives.c (mark_regno_dead): Same.
	* lra-remat.c: Same.
	* lra-spills.c: Same.
	* lto-streamer.h: Same.
	* mem-stats.h: Same.
	* omp-grid.c (omp_grid_lastprivate_predicate): Same.
	* omp-low.c (omp_clause_aligned_alignment): Same.
	* optabs-query.h (get_vcond_eq_icode): Same.
	* optabs.h: Same.
	* opts.c (wrap_help): Same.
	* poly-int.h: Same.
	* predict.c (predict_paths_leading_to_edge): Same.
	* pretty-print.h: Same.
	* profile-count.h: Same.
	* read-md.h: Same.
	* read-rtl-function.c: Same.
	* ree.c: Same.
	* reginfo.c: Same.
	* regrename.c: Same.
	* regrename.h: Same.
	* reload.h: Same.
	* rtl-iter.h: Same.
	* rtl.h (costs_add_n_insns): Same.
	* sanopt.c: Same.
	* sched-int.h: Same.
	* sel-sched-ir.h: Same.
	* selftest.h: Same.
	* sese.h (vec_find): Same.
	* stmt.c: Same.
	* target-globals.h: Same.
	* tree-affine.c (aff_combination_find_elt): Same.
	* tree-affine.h: Same.
	* tree-data-ref.h: Same.
	* tree-outof-ssa.c (ssa_is_replaceable_p): Same.
	* tree-predcom.c: Same.
	* tree-scalar-evolution.c (find_var_scev_info): Same.
	* tree-ssa-alias.h: Same.
	* tree-ssa-ccp.c: Same.
	* tree-ssa-coalesce.c (ssa_conflicts_dump): Same.
	* tree-ssa-loop-im.c (for_all_locs_in_loop): Same.
	(rewrite_mem_refs): Same.
	(execute_sm_if_changed): Same.
	(hoist_memory_references): Same.
	* tree-ssa-loop-ivopts.c (operator<=): Same.
	* tree-ssa-loop.h: Same.
	* tree-ssa-pre.c (get_or_alloc_expr_for_name): Same.
	* tree-ssa-structalias.c: Same.
	* tree-switch-conversion.h (cluster::cluster): Same.
	(simple_cluster::simple_cluster): Same.
	* tree-vect-patterns.c (type_conversion_p): Same.
	* tree-vectorizer.c (dump_stmt_cost): Same.
	* tree-vectorizer.h (loop_vec_info_for_loop): Same.
	* tree.c (protected_set_expr_location): Same.
	* tree.h (desired_pro_or_demotion_p): Same.
	(fndecl_built_in_p): Same.
	* unique-ptr-tests.cc: Same.
	* var-tracking.c (delete_variable_part): Same.
	* varasm.c (assemble_real): Same.
	(tree_output_constant_def): Same.
	* vec.c: Same.
	* wide-int-bitmask.h: Same.
	* wide-int.h (decompose): Same.

From-SVN: r273308
This commit is contained in:
Martin Sebor 2019-07-09 16:36:00 +00:00 committed by Martin Sebor
parent 1f88cc260c
commit 6c1dae73cd
145 changed files with 761 additions and 299 deletions

View file

@ -1,3 +1,152 @@
2019-07-09 Martin Sebor <msebor@redhat.com>
PR c++/61339
* align.h: Change class-key from class to struct and vice versa
to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
* alloc-pool.h: Same.
* asan.c (shadow_mem_size): Same.
* auto-profile.c: Same.
* basic-block.h: Same.
* bitmap.h: Same.
* cfgexpand.c (set_rtl): Same.
(expand_one_stack_var_at): Same.
* cfghooks.h: Same.
* cfgloop.h: Same.
* cgraph.h: Same.
* config/i386/i386.h: Same.
* df-problems.c (df_print_bb_index): Same.
* df-scan.c: Same.
* df.h (df_single_use): Same.
* diagnostic-show-locus.c (layout::print_annotation_line): Same.
(layout::annotation_line_showed_range_p): Same.
(get_printed_columns): Same.
(correction::ensure_terminated): Same.
(line_corrections::~line_corrections): Same.
* dojump.h: Same.
* dse.c: Same.
* dump-context.h: Same.
* dumpfile.h: Same.
* dwarf2out.c: Same.
* edit-context.c: Same.
* fibonacci_heap.c (test_union_of_equal_heaps): Same.
* flags.h: Same.
* function.c (assign_stack_local): Same.
* function.h: Same.
* gcc.c: Same.
* gcov.c (block_info::block_info): Same.
* genattrtab.c: Same.
* genextract.c: Same.
* genmatch.c (comparison_code_p): Same.
(id_base::id_base): Same.
(decision_tree::print): Same.
* genoutput.c: Same.
* genpreds.c (write_one_predicate_function): Same.
* genrecog.c (validate_pattern): Same.
(find_operand_positions): Same.
(optimize_subroutine_group): Same.
(merge_pattern_transition::merge_pattern_transition): Same.
(merge_pattern_info::merge_pattern_info): Same.
(merge_state_result::merge_state_result): Same.
(merge_into_state): Same.
* gensupport.c: Same.
* gensupport.h: Same.
* ggc-common.c (init_ggc_heuristics): Same.
* ggc-tests.c (test_union): Same.
* gimple-loop-interchange.cc (dump_induction): Same.
* gimple-loop-versioning.cc: Same.
* gimple-match.h (gimple_match_cond::any_else): Same.
* gimple-ssa-backprop.c: Same.
* gimple-ssa-sprintf.c: Same.
* gimple-ssa-store-merging.c (store_operand_info::store_operand_info): Same.
(store_immediate_info::store_immediate_info): Same.
(merged_store_group::apply_stores): Same.
(get_location_for_stmts): Same.
* gimple-ssa-strength-reduction.c: Same.
* gimple-ssa-warn-alloca.c: Same.
* gimple-ssa-warn-restrict.c (pass_wrestrict::execute): Same.
* godump.c (go_type_decl): Same.
* hash-map-tests.c (test_map_of_strings_to_int): Same.
* hash-map.h: Same.
* hash-set-tests.c (test_set_of_strings): Same.
* hsa-brig.c: Same.
* hsa-common.h: Same.
* hsa-gen.c (transformable_switch_to_sbr_p): Same.
* input.c (assert_loceq): Same.
* input.h: Same.
* ipa-cp.c: Same.
* ipa-devirt.c (possible_polymorphic_call_targets_1): Same.
* ipa-fnsummary.h: Same.
* ipa-inline.h: Same.
* ipa-prop.h: Same.
* ipa-split.c (visit_bb): Same.
* ira-int.h (minmax_set_iter_next): Same.
* loop-invariant.c: Same.
* loop-iv.c: Same.
* lra-eliminations.c: Same.
* lra-int.h: Same.
* lra-lives.c (mark_regno_dead): Same.
* lra-remat.c: Same.
* lra-spills.c: Same.
* lto-streamer.h: Same.
* mem-stats.h: Same.
* omp-grid.c (omp_grid_lastprivate_predicate): Same.
* omp-low.c (omp_clause_aligned_alignment): Same.
* optabs-query.h (get_vcond_eq_icode): Same.
* optabs.h: Same.
* opts.c (wrap_help): Same.
* poly-int.h: Same.
* predict.c (predict_paths_leading_to_edge): Same.
* pretty-print.h: Same.
* profile-count.h: Same.
* read-md.h: Same.
* read-rtl-function.c: Same.
* ree.c: Same.
* reginfo.c: Same.
* regrename.c: Same.
* regrename.h: Same.
* reload.h: Same.
* rtl-iter.h: Same.
* rtl.h (costs_add_n_insns): Same.
* sanopt.c: Same.
* sched-int.h: Same.
* sel-sched-ir.h: Same.
* selftest.h: Same.
* sese.h (vec_find): Same.
* stmt.c: Same.
* target-globals.h: Same.
* tree-affine.c (aff_combination_find_elt): Same.
* tree-affine.h: Same.
* tree-data-ref.h: Same.
* tree-outof-ssa.c (ssa_is_replaceable_p): Same.
* tree-predcom.c: Same.
* tree-scalar-evolution.c (find_var_scev_info): Same.
* tree-ssa-alias.h: Same.
* tree-ssa-ccp.c: Same.
* tree-ssa-coalesce.c (ssa_conflicts_dump): Same.
* tree-ssa-loop-im.c (for_all_locs_in_loop): Same.
(rewrite_mem_refs): Same.
(execute_sm_if_changed): Same.
(hoist_memory_references): Same.
* tree-ssa-loop-ivopts.c (operator<=): Same.
* tree-ssa-loop.h: Same.
* tree-ssa-pre.c (get_or_alloc_expr_for_name): Same.
* tree-ssa-structalias.c: Same.
* tree-switch-conversion.h (cluster::cluster): Same.
(simple_cluster::simple_cluster): Same.
* tree-vect-patterns.c (type_conversion_p): Same.
* tree-vectorizer.c (dump_stmt_cost): Same.
* tree-vectorizer.h (loop_vec_info_for_loop): Same.
* tree.c (protected_set_expr_location): Same.
* tree.h (desired_pro_or_demotion_p): Same.
(fndecl_built_in_p): Same.
* unique-ptr-tests.cc: Same.
* var-tracking.c (delete_variable_part): Same.
* varasm.c (assemble_real): Same.
(tree_output_constant_def): Same.
* vec.c: Same.
* wide-int-bitmask.h: Same.
* wide-int.h (decompose): Same.
2019-07-09 Richard Biener <rguenther@suse.de>
PR tree-optimization/91114

View file

@ -45,8 +45,9 @@ struct align_flags_tuple
/* Alignment flags is structure used as value of -align-* options.
It's used in target-dependant code. */
struct align_flags
class align_flags
{
public:
/* Default constructor. */
align_flags (int log0 = 0, int maxskip0 = 0, int log1 = 0, int maxskip1 = 0)
{

View file

@ -34,8 +34,9 @@ typedef unsigned long ALLOC_POOL_ID_TYPE;
extern ALLOC_POOL_ID_TYPE last_id;
/* Pool allocator memory usage. */
struct pool_usage: public mem_usage
class pool_usage: public mem_usage
{
public:
/* Default contructor. */
pool_usage (): m_element_size (0), m_pool_name ("") {}
/* Constructor. */

View file

@ -1225,8 +1225,9 @@ shadow_mem_size (unsigned HOST_WIDE_INT size)
#define RZ_BUFFER_SIZE 4
/* ASAN redzone buffer container that handles emission of shadow bytes. */
struct asan_redzone_buffer
class asan_redzone_buffer
{
public:
/* Constructor. */
asan_redzone_buffer (rtx shadow_mem, HOST_WIDE_INT prev_offset):
m_shadow_mem (shadow_mem), m_prev_offset (prev_offset),

View file

@ -136,8 +136,9 @@ typedef std::map<unsigned, gcov_type> icall_target_map;
typedef std::set<gimple *> stmt_set;
/* Represent count info of an inline stack. */
struct count_info
class count_info
{
public:
/* Sampled count of the inline stack. */
gcov_type count;

View file

@ -23,7 +23,8 @@ along with GCC; see the file COPYING3. If not see
#include <profile-count.h>
/* Control flow edge information. */
struct GTY((user)) edge_def {
class GTY((user)) edge_def {
public:
/* The two blocks at the ends of the edge. */
basic_block src;
basic_block dest;

View file

@ -212,8 +212,9 @@ along with GCC; see the file COPYING3. If not see
#include "obstack.h"
/* Bitmap memory usage. */
struct bitmap_usage: public mem_usage
class bitmap_usage: public mem_usage
{
public:
/* Default contructor. */
bitmap_usage (): m_nsearches (0), m_search_iter (0) {}
/* Constructor. */
@ -321,7 +322,8 @@ struct GTY((chain_next ("%h.next"))) bitmap_element {
/* Head of bitmap linked list. The 'current' member points to something
already pointed to by the chain started by first, so GTY((skip)) it. */
struct GTY(()) bitmap_head {
class GTY(()) bitmap_head {
public:
static bitmap_obstack crashme;
/* Poison obstack to not make it not a valid initialized GC bitmap. */
CONSTEXPR bitmap_head()

View file

@ -1,3 +1,11 @@
2019-07-09 Martin Sebor <msebor@redhat.com>
PR c++/61339
* c-format.c (check_argument_type): Change class-key from class to
struct and vice versa to match convention and avoid -Wclass-is-pod
and -Wstruct-no-pod.
* c-pretty-print.h: Same.
2019-07-03 Martin Liska <mliska@suse.cz>
* c-common.c (try_to_locate_new_include_insertion_point): Remove

View file

@ -1839,8 +1839,9 @@ class flag_chars_t
/* Support struct for argument_parser and check_format_info_main.
Encapsulates any length modifier applied to the current argument. */
struct length_modifier
class length_modifier
{
public:
length_modifier ()
: chars (NULL), val (FMT_LEN_none), std (STD_C89),
scalar_identity_flag (0)
@ -2853,8 +2854,9 @@ check_argument_type (const format_char_info *fci,
/* Describes "paired tokens" within the format string that are
expected to be balanced. */
struct baltoks_t
class baltoks_t
{
public:
baltoks_t (): singlequote (), doublequote () { }
typedef auto_vec<const char *> balanced_tokens_t;

View file

@ -47,8 +47,9 @@ typedef void (*c_pretty_print_fn) (c_pretty_printer *, tree);
facilities provided here. A derived pretty-printer can override
any function listed in the vtable below. See cp/cxx-pretty-print.h
and cp/cxx-pretty-print.c for an example of derivation. */
struct c_pretty_printer : pretty_printer
class c_pretty_printer : public pretty_printer
{
public:
c_pretty_printer ();
// Format string, possibly translated.

View file

@ -1,3 +1,10 @@
2019-07-09 Martin Sebor <msebor@redhat.com>
PR c++/61339
* c-decl.c: Change class-key from class to struct and vice versa
to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
* gimple-parser.c: Same.
2019-07-01 Richard Biener <rguenther@suse.de>
* gimple-parser.c (c_parser_gimple_postfix_expression): Handle

View file

@ -574,8 +574,9 @@ typedef struct c_binding *c_binding_ptr;
/* Information that we keep for a struct or union while it is being
parsed. */
struct c_struct_parse_info
class c_struct_parse_info
{
public:
/* If warn_cxx_compat, a list of types defined within this
struct. */
auto_vec<tree> struct_types;

View file

@ -68,8 +68,9 @@ along with GCC; see the file COPYING3. If not see
/* GIMPLE parser state. */
struct gimple_parser
class gimple_parser
{
public:
gimple_parser (c_parser *p) : parser (p), edges(), current_bb(NULL) {}
/* c_parser is not visible here, use composition and fake inheritance
via a conversion operator. */
@ -77,8 +78,9 @@ struct gimple_parser
c_parser *parser;
/* CFG build state. */
struct gimple_parser_edge
class gimple_parser_edge
{
public:
int src;
int dest;
int flags;

View file

@ -305,8 +305,9 @@ set_rtl (tree t, rtx x)
/* This structure holds data relevant to one variable that will be
placed in a stack slot. */
struct stack_var
class stack_var
{
public:
/* The Variable. */
tree decl;
@ -1021,8 +1022,9 @@ expand_one_stack_var_at (tree decl, rtx base, unsigned base_align,
set_rtl (decl, x);
}
struct stack_vars_data
class stack_vars_data
{
public:
/* Vector of offset pairs, always end of some padding followed
by start of the padding that needs Address Sanitizer protection.
The vector is in reversed, highest offset pairs come first. */

View file

@ -58,8 +58,9 @@ typedef int_hash <unsigned short, 0> dependence_hash;
/* Optional data for duplicate_block. */
struct copy_bb_data
class copy_bb_data
{
public:
copy_bb_data() : dependence_map (NULL) {}
~copy_bb_data () { delete dependence_map; }

View file

@ -46,7 +46,8 @@ enum iv_extend_code
/* The structure describing a bound on number of iterations of a loop. */
struct GTY ((chain_next ("%h.next"))) nb_iter_bound {
class GTY ((chain_next ("%h.next"))) nb_iter_bound {
public:
/* The statement STMT is executed at most ... */
gimple *stmt;
@ -113,7 +114,8 @@ struct GTY ((chain_next ("%h.next"))) control_iv {
};
/* Structure to hold information for each natural loop. */
struct GTY ((chain_next ("%h.next"))) loop {
class GTY ((chain_next ("%h.next"))) loop {
public:
/* Index into loops array. Note indices will never be reused after loop
is destroyed. */
int num;
@ -422,8 +424,9 @@ void mark_loop_for_removal (loop_p);
computation is done, which would enable it to be different from the
outer one? */
struct rtx_iv
class rtx_iv
{
public:
/* Its base and step (mode of base and step is supposed to be extend_mode,
see the description above). */
rtx base, step;
@ -448,8 +451,9 @@ struct rtx_iv
/* The description of an exit from the loop and of the number of iterations
till we take the exit. */
struct GTY(()) niter_desc
class GTY(()) niter_desc
{
public:
/* The edge out of the loop. */
edge out_edge;
@ -651,8 +655,9 @@ enum li_flags
/* The iterator for loops. */
struct loop_iterator
class loop_iterator
{
public:
loop_iterator (function *fn, loop_p *loop, unsigned flags);
~loop_iterator ();

View file

@ -100,8 +100,8 @@ enum symbol_partitioning_class
/* Base of all entries in the symbol table.
The symtab_node is inherited by cgraph and varpol nodes. */
class GTY((desc ("%h.type"), tag ("SYMTAB_SYMBOL"),
chain_next ("%h.next"), chain_prev ("%h.previous")))
struct GTY((desc ("%h.type"), tag ("SYMTAB_SYMBOL"),
chain_next ("%h.next"), chain_prev ("%h.previous")))
symtab_node
{
public:
@ -912,7 +912,8 @@ struct cgraph_edge_hasher : ggc_ptr_hash<cgraph_edge>
/* The cgraph data structure.
Each function decl has assigned cgraph_node listing callees and callers. */
struct GTY((tag ("SYMTAB_FUNCTION"))) cgraph_node : public symtab_node {
class GTY((tag ("SYMTAB_FUNCTION"))) cgraph_node : public symtab_node
{
public:
friend class symbol_table;
@ -1632,8 +1633,9 @@ private:
/* Structure containing additional information about an indirect call. */
struct GTY(()) cgraph_indirect_call_info
class GTY(()) cgraph_indirect_call_info
{
public:
/* When agg_content is set, an offset where the call pointer is located
within the aggregate. */
HOST_WIDE_INT offset;
@ -1673,8 +1675,10 @@ struct GTY(()) cgraph_indirect_call_info
unsigned vptr_changed : 1;
};
struct GTY((chain_next ("%h.next_caller"), chain_prev ("%h.prev_caller"),
for_user)) cgraph_edge {
class GTY((chain_next ("%h.next_caller"), chain_prev ("%h.prev_caller"),
for_user)) cgraph_edge
{
public:
friend class cgraph_node;
friend class symbol_table;
@ -1856,8 +1860,8 @@ private:
/* The varpool data structure.
Each static variable decl has assigned varpool_node. */
class GTY((tag ("SYMTAB_VARIABLE"))) varpool_node : public symtab_node {
public:
struct GTY((tag ("SYMTAB_VARIABLE"))) varpool_node : public symtab_node
{
/* Dump given varpool node to F. */
void dump (FILE *f);

View file

@ -2417,8 +2417,9 @@ const wide_int_bitmask PTA_KNM = PTA_KNL | PTA_AVX5124VNNIW
#include "insn-attr-common.h"
struct pta
class pta
{
public:
const char *const name; /* processor name or nickname. */
const enum processor_type processor;
const enum attr_cpu schedule;

View file

@ -1,3 +1,19 @@
2019-07-09 Martin Sebor <msebor@redhat.com>
PR c++/61339
* constexpr.c (cxx_eval_call_expression): Change class-key from class
to struct and vice versa to match convention and avoid -Wclass-is-pod
and -Wstruct-no-pod.
* constraint.cc (get_concept_definition): Same.
* cp-tree.h: Same.
* cxx-pretty-print.h: Same.
* error.c: Same.
* logic.cc (term_list::replace): Same.
* name-lookup.c (find_local_binding): Same.
* pt.c (tsubst_binary_right_fold): Same.
* search.c (field_accessor_p): Same.
* semantics.c (expand_or_defer_fn): Same.
2019-07-08 Jakub Jelinek <jakub@redhat.com>
PR c++/91110

View file

@ -1753,8 +1753,9 @@ cxx_eval_call_expression (const constexpr_ctx *ctx, tree t,
/* We build up the bindings list before we know whether we already have this
call cached. If we don't end up saving these bindings, ggc_free them when
this function exits. */
struct free_bindings
class free_bindings
{
public:
tree &bindings;
bool do_free;
free_bindings (tree &b): bindings (b), do_free(true) { }

View file

@ -517,8 +517,9 @@ get_concept_definition (tree decl)
int expansion_level = 0;
struct expanding_concept_sentinel
class expanding_concept_sentinel
{
public:
expanding_concept_sentinel ()
{
++expansion_level;

View file

@ -873,8 +873,9 @@ struct named_decl_hash : ggc_remove <tree>
/* Simplified unique_ptr clone to release a tree vec on exit. */
struct releasing_vec
class releasing_vec
{
public:
typedef vec<tree, va_gc> vec_t;
releasing_vec (vec_t *v): v(v) { }
@ -1728,8 +1729,9 @@ extern GTY(()) struct saved_scope *scope_chain;
/* RAII sentinel to handle clearing processing_template_decl and restoring
it when done. */
struct processing_template_decl_sentinel
class processing_template_decl_sentinel
{
public:
int saved;
processing_template_decl_sentinel (bool reset = true)
: saved (processing_template_decl)
@ -1746,8 +1748,9 @@ struct processing_template_decl_sentinel
/* RAII sentinel to disable certain warnings during template substitution
and elsewhere. */
struct warning_sentinel
class warning_sentinel
{
public:
int &flag;
int val;
warning_sentinel(int& flag, bool suppress=true)
@ -5267,8 +5270,9 @@ extern int cp_unevaluated_operand;
/* RAII class used to inhibit the evaluation of operands during parsing
and template instantiation. Evaluation warnings are also inhibited. */
struct cp_unevaluated
class cp_unevaluated
{
public:
cp_unevaluated ();
~cp_unevaluated ();
};
@ -5276,8 +5280,9 @@ struct cp_unevaluated
/* The reverse: an RAII class used for nested contexts that are evaluated even
if the enclosing context is not. */
struct cp_evaluated
class cp_evaluated
{
public:
int uneval;
int inhibit;
cp_evaluated ()
@ -5304,8 +5309,9 @@ enum unification_kind_t {
// specializations. When the stack goes out of scope, the
// previous pointer map is restored.
enum lss_policy { lss_blank, lss_copy };
struct local_specialization_stack
class local_specialization_stack
{
public:
local_specialization_stack (lss_policy = lss_blank);
~local_specialization_stack ();
@ -6973,8 +6979,9 @@ extern bool perform_or_defer_access_check (tree, tree, tree,
/* RAII sentinel to ensures that deferred access checks are popped before
a function returns. */
struct deferring_access_check_sentinel
class deferring_access_check_sentinel
{
public:
deferring_access_check_sentinel (enum deferring_kind kind = dk_deferred)
{
push_deferring_access_checks (kind);

View file

@ -29,8 +29,9 @@ enum cxx_pretty_printer_flags
pp_cxx_flag_default_argument = 1 << pp_c_flag_last_bit
};
struct cxx_pretty_printer : c_pretty_printer
class cxx_pretty_printer : public c_pretty_printer
{
public:
cxx_pretty_printer ();
void constant (tree);

View file

@ -107,8 +107,9 @@ static bool cp_printer (pretty_printer *, text_info *, const char *,
/* Struct for handling %H or %I, which require delaying printing the
type until a postprocessing stage. */
struct deferred_printed_type
class deferred_printed_type
{
public:
deferred_printed_type ()
: m_tree (NULL_TREE), m_buffer_ptr (NULL), m_verbose (false), m_quote (false)
{}

View file

@ -104,8 +104,9 @@ struct term_hasher : ggc_ptr_hash<term_entry>
Each term list maintains an iterator that refers to the current
term. This can be used by various tactics to support iteration
and stateful manipulation of the list. */
struct term_list
class term_list
{
public:
typedef std::list<tree>::iterator iterator;
term_list ();
@ -220,8 +221,9 @@ term_list::replace (iterator iter, tree t1, tree t2)
conclusions written as propositions in the constraint
language (i.e., lists of trees). */
struct proof_goal
class proof_goal
{
public:
term_list assumptions;
term_list conclusions;
};
@ -230,8 +232,9 @@ struct proof_goal
current sub-goal. The class also provides facilities
for managing subgoals and constructing term lists. */
struct proof_state : std::list<proof_goal>
class proof_state : public std::list<proof_goal>
{
public:
proof_state ();
iterator branch (iterator i);

View file

@ -157,7 +157,7 @@ find_local_binding (cp_binding_level *b, tree name)
return NULL;
}
struct name_lookup
class name_lookup
{
public:
typedef std::pair<tree, tree> using_pair;

View file

@ -12032,8 +12032,9 @@ tsubst_binary_right_fold (tree t, tree args, tsubst_flags_t complain,
/* Walk through the pattern of a pack expansion, adding everything in
local_specializations to a list. */
struct el_data
class el_data
{
public:
hash_set<tree> internal;
tree extra;
tsubst_flags_t complain;

View file

@ -1803,8 +1803,9 @@ field_accessor_p (tree fn, tree field_decl, bool const_p)
/* Callback data for dfs_locate_field_accessor_pre. */
struct locate_field_data
class locate_field_data
{
public:
locate_field_data (tree field_decl_, bool const_p_)
: field_decl (field_decl_), const_p (const_p_) {}

View file

@ -4380,8 +4380,9 @@ expand_or_defer_fn (tree fn)
}
}
struct nrv_data
class nrv_data
{
public:
nrv_data () : visited (37) {}
tree var;

View file

@ -144,8 +144,9 @@ df_print_bb_index (basic_block bb, FILE *file)
/* Private data used to compute the solution for this problem. These
data structures are not accessible outside of this module. */
struct df_rd_problem_data
class df_rd_problem_data
{
public:
/* The set of defs to regs invalidated by call. */
bitmap_head sparse_invalidated_by_call;
/* The set of defs to regs invalidate by call for rd. */

View file

@ -44,8 +44,9 @@ static HARD_REG_SET elim_reg_set;
/* Initialize ur_in and ur_out as if all hard registers were partially
available. */
struct df_collection_rec
class df_collection_rec
{
public:
auto_vec<df_ref, 128> def_vec;
auto_vec<df_ref, 32> use_vec;
auto_vec<df_ref, 32> eq_use_vec;

View file

@ -524,8 +524,9 @@ struct df_reg_info
used by owners of the problem.
----------------------------------------------------------------------------*/
struct df_d
class df_d
{
public:
/* The set of problems to be solved is stored in two arrays. In
PROBLEMS_IN_ORDER, the problems are stored in the order that they
@ -830,8 +831,9 @@ struct df_scan_bb_info
the ref except sparse_kill which is indexed by regno. For the
LR&RD problem, the kill set is not complete: It does not contain
DEFs killed because the set register has died in the LR set. */
struct df_rd_bb_info
class df_rd_bb_info
{
public:
/* Local sets to describe the basic blocks. */
bitmap_head kill;
bitmap_head sparse_kill;
@ -846,8 +848,9 @@ struct df_rd_bb_info
/* Multiple reaching definitions. All bitmaps are referenced by the
register number. */
struct df_md_bb_info
class df_md_bb_info
{
public:
/* Local sets to describe the basic blocks. */
bitmap_head gen; /* Partial/conditional definitions live at BB out. */
bitmap_head kill; /* Other definitions that are live at BB out. */
@ -862,8 +865,9 @@ struct df_md_bb_info
/* Live registers, a backwards dataflow problem. All bitmaps are
referenced by the register number. */
struct df_lr_bb_info
class df_lr_bb_info
{
public:
/* Local sets to describe the basic blocks. */
bitmap_head def; /* The set of registers set in this block
- except artificial defs at the top. */
@ -879,8 +883,9 @@ struct df_lr_bb_info
register number. Anded results of the forwards and backward live
info. Note that the forwards live information is not available
separately. */
struct df_live_bb_info
class df_live_bb_info
{
public:
/* Local sets to describe the basic blocks. */
bitmap_head kill; /* The set of registers unset in this block. Calls,
for instance, unset registers. */
@ -897,8 +902,9 @@ struct df_live_bb_info
pseudo. Only pseudos that have a size of 2 * UNITS_PER_WORD are
meaningfully tracked. */
struct df_word_lr_bb_info
class df_word_lr_bb_info
{
public:
/* Local sets to describe the basic blocks. */
bitmap_head def; /* The set of registers set in this block
- except artificial defs at the top. */
@ -911,8 +917,9 @@ struct df_word_lr_bb_info
/* Must-initialized registers. All bitmaps are referenced by the
register number. */
struct df_mir_bb_info
class df_mir_bb_info
{
public:
/* Local sets to describe the basic blocks. */
bitmap_head kill; /* The set of registers unset in this block. Calls,
for instance, unset registers. */
@ -1222,7 +1229,7 @@ df_single_use (const df_insn_info *info)
/* web */
class web_entry_base
struct web_entry_base
{
private:
/* Reference to the parent in the union/find tree. */

View file

@ -164,8 +164,9 @@ struct line_bounds
splits the pertinent source lines into a list of disjoint line_span
instances (e.g. lines 5-10, lines 15-20, line 23). */
struct line_span
class line_span
{
public:
line_span (linenum_type first_line, linenum_type last_line)
: m_first_line (first_line), m_last_line (last_line)
{
@ -1409,8 +1410,9 @@ layout::print_annotation_line (linenum_type row, const line_bounds lbounds)
A label within the given row of source. */
struct line_label
class line_label
{
public:
line_label (int state_idx, int column, label_text text)
: m_state_idx (state_idx), m_column (column),
m_text (text), m_length (strlen (text.m_buffer)),
@ -1723,8 +1725,9 @@ layout::annotation_line_showed_range_p (linenum_type line, int start_column,
/* A range of columns within a line. */
struct column_range
class column_range
{
public:
column_range (int start_, int finish_) : start (start_), finish (finish_)
{
/* We must have either a range, or an insertion. */
@ -1776,8 +1779,9 @@ get_printed_columns (const fixit_hint *hint)
instances that affected the line, potentially consolidating hints
into corrections to make the result easier for the user to read. */
struct correction
class correction
{
public:
correction (column_range affected_columns,
column_range printed_columns,
const char *new_text, size_t new_text_len)
@ -1854,8 +1858,9 @@ correction::ensure_terminated ()
This is used by layout::print_trailing_fixits for planning
how to print the fix-it hints affecting the line. */
struct line_corrections
class line_corrections
{
public:
line_corrections (const char *filename, linenum_type row)
: m_filename (filename), m_row (row)
{}
@ -1881,8 +1886,9 @@ line_corrections::~line_corrections ()
/* A struct wrapping a particular source line, allowing
run-time bounds-checking of accesses in a checked build. */
struct source_line
class source_line
{
public:
source_line (const char *filename, int line);
char_span as_span () { return char_span (chars, width); }

View file

@ -37,8 +37,9 @@ extern void do_pending_stack_adjust (void);
/* Struct for saving/restoring of pending_stack_adjust/stack_pointer_delta
values. */
struct saved_pending_stack_adjust
class saved_pending_stack_adjust
{
public:
/* Saved value of pending_stack_adjust. */
poly_int64 x_pending_stack_adjust;

View file

@ -220,8 +220,9 @@ static bitmap scratch = NULL;
struct insn_info_type;
/* This structure holds information about a candidate store. */
struct store_info
class store_info
{
public:
/* False means this is a clobber. */
bool is_set;
@ -309,8 +310,9 @@ static object_allocator<store_info> rtx_store_info_pool ("rtx_store_info_pool");
/* This structure holds information about a load. These are only
built for rtx bases. */
struct read_info_type
class read_info_type
{
public:
/* The id of the mem group of the base address. */
int group_id;

View file

@ -166,8 +166,9 @@ public:
private:
/* Information on an optinfo_item that was generated during phase 2 of
formatting. */
struct stashed_item
class stashed_item
{
public:
stashed_item (const char **buffer_ptr_, optinfo_item *item_)
: buffer_ptr (buffer_ptr_), item (item_) {}
const char **buffer_ptr;

View file

@ -367,8 +367,9 @@ class dump_user_location_t
/* A class for identifying where in the compiler's own source
(or a plugin) that a dump message is being emitted from. */
struct dump_impl_location_t
class dump_impl_location_t
{
public:
dump_impl_location_t (
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)
const char *file = __builtin_FILE (),

View file

@ -3104,7 +3104,8 @@ die_node;
/* Set to TRUE while dwarf2out_early_global_decl is running. */
static bool early_dwarf;
static bool early_dwarf_finished;
struct set_early_dwarf {
class set_early_dwarf {
public:
bool saved;
set_early_dwarf () : saved(early_dwarf)
{

View file

@ -48,8 +48,9 @@ class line_event;
/* A struct to hold the params of a print_diff call. */
struct diff
class diff
{
public:
diff (pretty_printer *pp, bool show_filenames)
: m_pp (pp), m_show_filenames (show_filenames) {}

View file

@ -219,8 +219,9 @@ test_union_of_equal_heaps ()
/* Dummy struct for testing. */
struct heap_key
class heap_key
{
public:
heap_key (int k): key (k)
{
}

View file

@ -42,8 +42,9 @@ extern bool final_insns_dump_p;
/* Other basic status info about current function. */
struct target_flag_state
class target_flag_state
{
public:
/* Each falign-foo can generate up to two levels of alignment:
-falign-foo=N:M[:N2:M2] */
align_flags x_align_loops;

View file

@ -556,7 +556,8 @@ assign_stack_local (machine_mode mode, poly_int64 size, int align)
result, all temporaries are preserved. A temporary is preserved by
pretending it was allocated at the previous nesting level. */
struct GTY(()) temp_slot {
class GTY(()) temp_slot {
public:
/* Points to next temporary slot. */
struct temp_slot *next;
/* Points to previous temporary slot. */

View file

@ -183,16 +183,18 @@ struct GTY(()) function_subsections {
/* Describe an empty area of space in the stack frame. These can be chained
into a list; this is used to keep track of space wasted for alignment
reasons. */
struct GTY(()) frame_space
class GTY(()) frame_space
{
public:
struct frame_space *next;
poly_int64 start;
poly_int64 length;
};
struct GTY(()) stack_usage
class GTY(()) stack_usage
{
public:
/* # of bytes of static stack space allocated by the function. */
HOST_WIDE_INT static_stack_size;

View file

@ -57,7 +57,7 @@ compilation is specified by a string called a "spec". */
getenv ();
Hence we need to use "get" for the accessor method, not "getenv". */
class env_manager
struct env_manager
{
public:
void init (bool can_restore, bool debug);
@ -8579,7 +8579,7 @@ static int n_mdswitches;
/* Check whether a particular argument was used. The first time we
canonicalize the switches to keep only the ones we care about. */
class used_arg_t
struct used_arg_t
{
public:
int operator () (const char *p, int len);

View file

@ -121,8 +121,9 @@ struct arc_info
/* Describes which locations (lines and files) are associated with
a basic block. */
struct block_location_info
class block_location_info
{
public:
block_location_info (unsigned _source_file_idx):
source_file_idx (_source_file_idx)
{}
@ -134,8 +135,9 @@ struct block_location_info
/* Describes a basic block. Contains lists of arcs to successor and
predecessor blocks. */
struct block_info
class block_info
{
public:
/* Constructor. */
block_info ();
@ -191,8 +193,9 @@ block_info::block_info (): succ (NULL), pred (NULL), num_succ (0), num_pred (0),
/* Describes a single line of source. Contains a chain of basic blocks
with code on it. */
struct line_info
class line_info
{
public:
/* Default constructor. */
line_info ();
@ -230,8 +233,9 @@ static int flag_demangled_names = 0;
/* Describes a single function. Contains an array of basic blocks. */
struct function_info
class function_info
{
public:
function_info ();
~function_info ();
@ -356,8 +360,9 @@ struct coverage_info
/* Describes a file mentioned in the block graph. Contains an array
of line info. */
struct source_info
class source_info
{
public:
/* Default constructor. */
source_info ();

View file

@ -133,8 +133,9 @@ static struct obstack *temp_obstack = &obstack2;
`struct insn_def'. This is done to allow attribute definitions to occur
anywhere in the file. */
struct insn_def
class insn_def
{
public:
struct insn_def *next; /* Next insn in chain. */
rtx def; /* The DEFINE_... */
int insn_code; /* Instruction number. */
@ -169,8 +170,9 @@ struct attr_value
/* Structure for each attribute. */
struct attr_desc
class attr_desc
{
public:
char *name; /* Name of attribute. */
const char *enum_name; /* Enum name for DEFINE_ENUM_NAME. */
struct attr_desc *next; /* Next attribute. */
@ -184,8 +186,9 @@ struct attr_desc
/* Structure for each DEFINE_DELAY. */
struct delay_desc
class delay_desc
{
public:
rtx def; /* DEFINE_DELAY expression. */
struct delay_desc *next; /* Next DEFINE_DELAY. */
file_location loc; /* Where in the .md files it occurs. */

View file

@ -68,8 +68,9 @@ static struct code_ptr *peepholes;
data that will be used to produce an extractions structure. */
struct accum_extract
class accum_extract
{
public:
accum_extract () : oplocs (10), duplocs (10), dupnums (10), pathstr (20) {}
auto_vec<locstr> oplocs;

View file

@ -347,8 +347,9 @@ comparison_code_p (enum tree_code code)
/* Base class for all identifiers the parser knows. */
struct id_base : nofree_ptr_hash<id_base>
class id_base : public nofree_ptr_hash<id_base>
{
public:
enum id_kind { CODE, FN, PREDICATE, USER, NULL_ID } kind;
id_base (id_kind, const char *, int = -1);
@ -393,8 +394,9 @@ id_base::id_base (id_kind kind_, const char *id_, int nargs_)
/* Identifier that maps to a tree code. */
struct operator_id : public id_base
class operator_id : public id_base
{
public:
operator_id (enum tree_code code_, const char *id_, unsigned nargs_,
const char *tcc_)
: id_base (id_base::CODE, id_, nargs_), code (code_), tcc (tcc_) {}
@ -404,8 +406,9 @@ struct operator_id : public id_base
/* Identifier that maps to a builtin or internal function code. */
struct fn_id : public id_base
class fn_id : public id_base
{
public:
fn_id (enum built_in_function fn_, const char *id_)
: id_base (id_base::FN, id_), fn (fn_) {}
fn_id (enum internal_fn fn_, const char *id_)
@ -417,8 +420,9 @@ struct simplify;
/* Identifier that maps to a user-defined predicate. */
struct predicate_id : public id_base
class predicate_id : public id_base
{
public:
predicate_id (const char *id_)
: id_base (id_base::PREDICATE, id_), matchers (vNULL) {}
vec<simplify *> matchers;
@ -426,8 +430,9 @@ struct predicate_id : public id_base
/* Identifier that maps to a operator defined by a 'for' directive. */
struct user_id : public id_base
class user_id : public id_base
{
public:
user_id (const char *id_, bool is_oper_list_ = false)
: id_base (id_base::USER, id_), substitutes (vNULL),
used (false), is_oper_list (is_oper_list_) {}
@ -665,7 +670,8 @@ struct capture_info;
/* The base class for operands. */
struct operand {
class operand {
public:
enum op_type { OP_PREDICATE, OP_EXPR, OP_CAPTURE, OP_C_EXPR, OP_IF, OP_WITH };
operand (enum op_type type_, location_t loc_)
: type (type_), location (loc_) {}
@ -680,8 +686,9 @@ struct operand {
/* A predicate operand. Predicates are leafs in the AST. */
struct predicate : public operand
class predicate : public operand
{
public:
predicate (predicate_id *p_, location_t loc)
: operand (OP_PREDICATE, loc), p (p_) {}
predicate_id *p;
@ -690,8 +697,9 @@ struct predicate : public operand
/* An operand that constitutes an expression. Expressions include
function calls and user-defined predicate invocations. */
struct expr : public operand
class expr : public operand
{
public:
expr (id_base *operation_, location_t loc, bool is_commutative_ = false)
: operand (OP_EXPR, loc), operation (operation_),
ops (vNULL), expr_type (NULL), is_commutative (is_commutative_),
@ -723,11 +731,13 @@ struct expr : public operand
a leaf operand in the AST. This class is also used to represent
the code to be generated for 'if' and 'with' expressions. */
struct c_expr : public operand
class c_expr : public operand
{
public:
/* A mapping of an identifier and its replacement. Used to apply
'for' lowering. */
struct id_tab {
class id_tab {
public:
const char *id;
const char *oper;
id_tab (const char *id_, const char *oper_): id (id_), oper (oper_) {}
@ -753,8 +763,9 @@ struct c_expr : public operand
/* A wrapper around another operand that captures its value. */
struct capture : public operand
class capture : public operand
{
public:
capture (location_t loc, unsigned where_, operand *what_, bool value_)
: operand (OP_CAPTURE, loc), where (where_), value_match (value_),
what (what_) {}
@ -773,8 +784,9 @@ struct capture : public operand
/* if expression. */
struct if_expr : public operand
class if_expr : public operand
{
public:
if_expr (location_t loc)
: operand (OP_IF, loc), cond (NULL), trueexpr (NULL), falseexpr (NULL) {}
c_expr *cond;
@ -784,8 +796,9 @@ struct if_expr : public operand
/* with expression. */
struct with_expr : public operand
class with_expr : public operand
{
public:
with_expr (location_t loc)
: operand (OP_WITH, loc), with (NULL), subexpr (NULL) {}
c_expr *with;
@ -845,8 +858,9 @@ is_a_helper <with_expr *>::test (operand *op)
duplicates all outer 'if' and 'for' expressions here so each
simplify can exist in isolation. */
struct simplify
class simplify
{
public:
enum simplify_kind { SIMPLIFY, MATCH };
simplify (simplify_kind kind_, unsigned id_, operand *match_,
@ -1598,8 +1612,9 @@ static unsigned current_id;
/* Decision tree base class, used for DT_NODE. */
struct dt_node
class dt_node
{
public:
enum dt_type { DT_NODE, DT_OPERAND, DT_TRUE, DT_MATCH, DT_SIMPLIFY };
enum dt_type type;
@ -1634,8 +1649,9 @@ struct dt_node
/* Generic decision tree node used for DT_OPERAND, DT_MATCH and DT_TRUE. */
struct dt_operand : public dt_node
class dt_operand : public dt_node
{
public:
operand *op;
dt_operand *match_dop;
unsigned pos;
@ -1660,8 +1676,9 @@ struct dt_operand : public dt_node
/* Leaf node of the decision tree, used for DT_SIMPLIFY. */
struct dt_simplify : public dt_node
class dt_simplify : public dt_node
{
public:
simplify *s;
unsigned pattern_no;
dt_operand **indexes;
@ -1697,8 +1714,9 @@ is_a_helper <dt_simplify *>::test (dt_node *n)
/* A container for the actual decision tree. */
struct decision_tree
class decision_tree
{
public:
dt_node *root;
void insert (struct simplify *, unsigned);
@ -2070,8 +2088,9 @@ decision_tree::print (FILE *f)
on the outermost match expression operands for cases we cannot
handle. */
struct capture_info
class capture_info
{
public:
capture_info (simplify *s, operand *, bool);
void walk_match (operand *o, unsigned toplevel_arg, bool, bool);
bool walk_result (operand *o, bool, operand *);

View file

@ -143,8 +143,9 @@ static struct operand_data **odata_end = &null_operand.next;
/* Record in this chain all information that we will output,
associated with the code number of the insn. */
struct data
class data
{
public:
struct data *next;
const char *name;
const char *template_code;
@ -179,8 +180,9 @@ static void process_template (struct data *, const char *);
static void validate_insn_alternatives (struct data *);
static void validate_insn_operands (struct data *);
struct constraint_data
class constraint_data
{
public:
struct constraint_data *next_this_letter;
file_location loc;
unsigned int namelen;

View file

@ -666,8 +666,9 @@ write_one_predicate_function (struct pred_data *p)
verify that there are no duplicate names. */
/* All data from one constraint definition. */
struct constraint_data
class constraint_data
{
public:
struct constraint_data *next_this_letter;
struct constraint_data *next_textual;
const char *name;

View file

@ -818,11 +818,13 @@ validate_pattern (rtx pattern, md_rtx_info *info, rtx set, int set_code)
to "T *prev, *next;" and a function "void set_parent (list_head <T> *)"
to set the parent list. */
template <typename T>
struct list_head
class list_head
{
public:
/* A range of linked items. */
struct range
class range
{
public:
range (T *);
range (T *, T *);
@ -1008,8 +1010,9 @@ operator != (const acceptance_type &a, const acceptance_type &b)
}
/* Represents a parameter to a pattern routine. */
struct parameter
class parameter
{
public:
/* The C type of parameter. */
enum type_enum {
/* Represents an invalid parameter. */
@ -1069,8 +1072,9 @@ operator != (const parameter &param1, const parameter &param2)
an ad-hoc enum value on success and -1 on failure. The routine can
be used by any subroutine type. The match can be parameterized by
things like mode, code and UNSPEC number. */
struct pattern_routine
class pattern_routine
{
public:
/* The state that implements the pattern. */
state *s;
@ -1096,8 +1100,9 @@ struct pattern_routine
static vec <pattern_routine *> patterns;
/* Represents one use of a pattern routine. */
struct pattern_use
class pattern_use
{
public:
/* The pattern routine to use. */
pattern_routine *routine;
@ -1107,8 +1112,9 @@ struct pattern_use
};
/* Represents a test performed by a decision. */
struct rtx_test
class rtx_test
{
public:
rtx_test ();
/* The types of test that can be performed. Most of them take as input
@ -1427,8 +1433,9 @@ operator != (const rtx_test &a, const rtx_test &b)
/* A simple set of transition labels. Most transitions have a singleton
label, so try to make that case as efficient as possible. */
struct int_set : public auto_vec <uint64_t, 1>
class int_set : public auto_vec <uint64_t, 1>
{
public:
typedef uint64_t *iterator;
int_set ();
@ -1496,8 +1503,9 @@ struct decision;
/* Represents a transition between states, dependent on the result of
a test T. */
struct transition
class transition
{
public:
transition (const int_set &, state *, bool);
void set_parent (list_head <transition> *);
@ -1536,8 +1544,9 @@ struct transition
to the transition's target state. If no suitable transition exists,
the machine either falls through to the next decision or, if there are no
more decisions to try, fails the match. */
struct decision : list_head <transition>
class decision : public list_head <transition>
{
public:
decision (const rtx_test &);
void set_parent (list_head <decision> *s);
@ -1556,8 +1565,9 @@ struct decision : list_head <transition>
/* Represents one machine state. For each state the machine tries a list
of decisions, in order, and acts on the first match. It fails without
further backtracking if no decisions match. */
struct state : list_head <decision>
class state : public list_head <decision>
{
public:
void set_parent (list_head <state> *) {}
};
@ -1767,8 +1777,9 @@ const unsigned char TESTED_CODE = 1;
const unsigned char TESTED_VECLEN = 2;
/* Represents a set of conditions that are known to hold. */
struct known_conditions
class known_conditions
{
public:
/* A mask of TESTED_ values for each position, indexed by the position's
id field. */
auto_vec <unsigned char> position_tests;
@ -2095,8 +2106,9 @@ find_operand_positions (state *s, vec <int> &operand_pos)
}
/* Statistics about a matching routine. */
struct stats
class stats
{
public:
stats ();
/* The total number of decisions in the routine, excluding trivial
@ -2235,8 +2247,9 @@ optimize_subroutine_group (const char *type, state *root)
struct merge_pattern_info;
/* Represents a transition from one pattern to another. */
struct merge_pattern_transition
class merge_pattern_transition
{
public:
merge_pattern_transition (merge_pattern_info *);
/* The target pattern. */
@ -2256,8 +2269,9 @@ merge_pattern_transition::merge_pattern_transition (merge_pattern_info *to_in)
/* Represents a pattern that can might match several states. The pattern
may replace parts of the test with a parameter value. It may also
replace transition labels with parameters. */
struct merge_pattern_info
class merge_pattern_info
{
public:
merge_pattern_info (unsigned int);
/* If PARAM_TEST_P, the state's singleton test should be generalized
@ -2329,8 +2343,9 @@ merge_pattern_info::merge_pattern_info (unsigned int num_transitions)
/* Describes one way of matching a particular state to a particular
pattern. */
struct merge_state_result
class merge_state_result
{
public:
merge_state_result (merge_pattern_info *, position *, merge_state_result *);
/* A pattern that matches the state. */
@ -2360,8 +2375,9 @@ merge_state_result::merge_state_result (merge_pattern_info *pattern_in,
/* Information about a state, used while trying to match it against
a pattern. */
struct merge_state_info
class merge_state_info
{
public:
merge_state_info (state *);
/* The state itself. */
@ -3860,7 +3876,8 @@ merge_into_state (state *s1, state *s2)
/* Pairs a pattern that needs to be matched with the rtx position at
which the pattern should occur. */
struct pattern_pos {
class pattern_pos {
public:
pattern_pos () {}
pattern_pos (rtx, position *);
@ -4384,8 +4401,9 @@ enum exit_state {
/* Information used while writing out code. */
struct output_state
class output_state
{
public:
/* The type of routine that we're generating. */
routine_type type;

View file

@ -65,8 +65,9 @@ static htab_t condition_table;
define_cond_exec and define_subst patterns, then return
them one at a time. */
struct queue_elem
class queue_elem
{
public:
rtx data;
file_location loc;
struct queue_elem *next;

View file

@ -26,7 +26,8 @@ struct obstack;
extern struct obstack *rtl_obstack;
/* Information about an .md define_* rtx. */
struct md_rtx_info {
class md_rtx_info {
public:
/* The rtx itself. */
rtx def;

View file

@ -818,8 +818,9 @@ init_ggc_heuristics (void)
}
/* GGC memory usage. */
struct ggc_usage: public mem_usage
class ggc_usage: public mem_usage
{
public:
/* Default constructor. */
ggc_usage (): m_freed (0), m_collected (0), m_overhead (0) {}
/* Constructor. */

View file

@ -176,8 +176,9 @@ test_union ()
/* Verify that destructors get run when instances are collected. */
struct GTY(()) test_struct_with_dtor
class GTY(()) test_struct_with_dtor
{
public:
/* This struct has a destructor; it *ought* to be called
by the ggc machinery when instances are collected. */
~test_struct_with_dtor () { dtor_call_count++; }

View file

@ -172,8 +172,9 @@ dump_induction (struct loop *loop, induction_p iv)
/* Loop candidate for interchange. */
struct loop_cand
class loop_cand
{
public:
loop_cand (struct loop *, struct loop *);
~loop_cand ();

View file

@ -179,8 +179,9 @@ struct address_term_info
/* Information about an address calculation, and the range of constant
offsets applied to it. */
struct address_info
class address_info
{
public:
static const unsigned int MAX_TERMS = 8;
/* One statement that calculates the address. If multiple statements
@ -210,8 +211,9 @@ struct address_info_hasher : nofree_ptr_hash <address_info>
};
/* Information about the versioning we'd like to apply to a loop. */
struct loop_info
class loop_info
{
public:
bool worth_versioning_p () const;
/* True if we've decided not to version this loop. The remaining

View file

@ -43,8 +43,9 @@ private:
/* Represents the condition under which an operation should happen,
and the value to use otherwise. The condition applies elementwise
(as for VEC_COND_EXPR) if the values are vectors. */
struct gimple_match_cond
class gimple_match_cond
{
public:
enum uncond { UNCOND };
/* Build an unconditional op. */
@ -79,8 +80,9 @@ gimple_match_cond::any_else () const
/* Represents an operation to be simplified, or the result of the
simplification. */
struct gimple_match_op
class gimple_match_op
{
public:
gimple_match_op ();
gimple_match_op (const gimple_match_cond &, code_helper, tree, unsigned int);
gimple_match_op (const gimple_match_cond &,

View file

@ -107,8 +107,9 @@ along with GCC; see the file COPYING3. If not see
namespace {
/* Information about a group of uses of an SSA name. */
struct usage_info
class usage_info
{
public:
usage_info () : flag_word (0) {}
usage_info &operator &= (const usage_info &);
usage_info operator & (const usage_info &) const;

View file

@ -520,8 +520,9 @@ enum format_lengths
/* Description of the result of conversion either of a single directive
or the whole format string. */
struct fmtresult
class fmtresult
{
public:
/* Construct a FMTRESULT object with all counters initialized
to MIN. KNOWNRANGE is set when MIN is valid. */
fmtresult (unsigned HOST_WIDE_INT min = HOST_WIDE_INT_MAX)

View file

@ -1324,8 +1324,9 @@ namespace {
and the other fields also reflect the memory load, or an SSA name, then
VAL represents the SSA name and all the other fields are zero, */
struct store_operand_info
class store_operand_info
{
public:
tree val;
tree base_addr;
poly_uint64 bitsize;
@ -1347,8 +1348,9 @@ store_operand_info::store_operand_info ()
to memory. These are created in the first phase and coalesced into
merged_store_group objects in the second phase. */
struct store_immediate_info
class store_immediate_info
{
public:
unsigned HOST_WIDE_INT bitsize;
unsigned HOST_WIDE_INT bitpos;
unsigned HOST_WIDE_INT bitregion_start;
@ -1413,8 +1415,9 @@ store_immediate_info::store_immediate_info (unsigned HOST_WIDE_INT bs,
These are produced by the second phase (coalescing) and consumed in the
third phase that outputs the widened stores. */
struct merged_store_group
class merged_store_group
{
public:
unsigned HOST_WIDE_INT start;
unsigned HOST_WIDE_INT width;
unsigned HOST_WIDE_INT bitregion_start;
@ -2083,8 +2086,9 @@ merged_store_group::apply_stores ()
/* Structure describing the store chain. */
struct imm_store_chain_info
class imm_store_chain_info
{
public:
/* Doubly-linked list that imposes an order on chain processing.
PNXP (prev's next pointer) points to the head of a list, or to
the next field in the previous chain in the list.
@ -3064,8 +3068,9 @@ get_location_for_stmts (vec<gimple *> &stmts)
/* Used to decribe a store resulting from splitting a wide store in smaller
regularly-sized stores in split_group. */
struct split_store
class split_store
{
public:
unsigned HOST_WIDE_INT bytepos;
unsigned HOST_WIDE_INT size;
unsigned HOST_WIDE_INT align;

View file

@ -226,8 +226,9 @@ enum cand_kind
CAND_PHI
};
struct slsr_cand_d
class slsr_cand_d
{
public:
/* The candidate statement S1. */
gimple *cand_stmt;
@ -329,8 +330,9 @@ typedef const struct cand_chain_d *const_cand_chain_t;
of the cost of initializers. The absolute value of the increment
is stored in the incr_info. */
struct incr_info_d
class incr_info_d
{
public:
/* The increment that relates a candidate to its basis. */
widest_int incr;

View file

@ -118,7 +118,8 @@ enum alloca_type {
};
// Type of an alloca call with its corresponding limit, if applicable.
struct alloca_type_and_limit {
class alloca_type_and_limit {
public:
enum alloca_type type;
// For ALLOCA_BOUND_MAYBE_LARGE and ALLOCA_BOUND_DEFINITELY_LARGE
// types, this field indicates the assumed limit if known or

View file

@ -124,8 +124,9 @@ pass_wrestrict::execute (function *fun)
/* Description of a memory reference by a built-in function. This
is similar to ao_ref but made especially suitable for -Wrestrict
and not for optimization. */
struct builtin_memref
class builtin_memref
{
public:
/* The original pointer argument to the built-in function. */
tree ptr;
/* The referenced subobject or NULL if not available, and the base

View file

@ -535,8 +535,9 @@ go_type_decl (tree decl, int local)
/* A container for the data we pass around when generating information
at the end of the compilation. */
struct godump_container
class godump_container
{
public:
/* DECLs that we have already seen. */
hash_set<tree> decls_seen;

View file

@ -103,8 +103,9 @@ test_map_of_strings_to_int ()
ASSERT_EQ (1, string_map.elements ());
}
typedef struct hash_map_test_val_t
typedef class hash_map_test_val_t
{
public:
static int ndefault;
static int ncopy;
static int nassign;

View file

@ -253,7 +253,8 @@ public:
/* Can't use std::pair here, because GCC before 4.3 don't handle
std::pair where template parameters are references well.
See PR86739. */
struct reference_pair {
class reference_pair {
public:
const Key &first;
Value &second;

View file

@ -134,8 +134,9 @@ test_set_of_strings ()
ASSERT_EQ (2, t.elements ());
}
typedef struct hash_set_test_value_t
typedef class hash_set_test_value_t
{
public:
static int ndefault;
static int ncopy;
static int nassign;

View file

@ -195,8 +195,9 @@ hash_table <hsa_internal_fn_hasher> *hsa_emitted_internal_decls;
/* List of sbr instructions. */
static vec <hsa_insn_sbr *> *switch_instructions;
struct function_linkage_pair
class function_linkage_pair
{
public:
function_linkage_pair (tree decl, unsigned int off)
: function_decl (decl), offset (off) {}

View file

@ -55,8 +55,9 @@ class hsa_bb;
/* Class representing an input argument, output argument (result) or a
variable, that will eventually end up being a symbol directive. */
struct hsa_symbol
class hsa_symbol
{
public:
/* Constructor. */
hsa_symbol (BrigType16_t type, BrigSegment8_t segment,
BrigLinkage8_t linkage, bool global_scope_p = false,
@ -1213,8 +1214,9 @@ enum hsa_function_kind
HSA_FUNCTION
};
struct hsa_function_summary
class hsa_function_summary
{
public:
/* Default constructor. */
hsa_function_summary ();

View file

@ -6213,8 +6213,9 @@ transformable_switch_to_sbr_p (gswitch *s)
/* Structure hold connection between PHI nodes and immediate
values hold by there nodes. */
struct phi_definition
class phi_definition
{
public:
phi_definition (unsigned phi_i, unsigned label_i, tree imm):
phi_index (phi_i), label_index (label_i), phi_value (imm)
{}

View file

@ -32,11 +32,13 @@ along with GCC; see the file COPYING3. If not see
/* This is a cache used by get_next_line to store the content of a
file to be searched for file lines. */
struct fcache
class fcache
{
public:
/* These are information used to store a line boundary. */
struct line_info
class line_info
{
public:
/* The line number. It starts from 1. */
size_t line_num;
@ -1691,8 +1693,9 @@ assert_loceq (const char *exp_filename, int exp_linenum, int exp_colnum,
The following struct describes a particular case within our test
matrix. */
struct line_table_case
class line_table_case
{
public:
line_table_case (int default_range_bits, int base_location)
: m_default_range_bits (default_range_bits),
m_base_location (base_location)
@ -2085,8 +2088,9 @@ class cpp_reader_ptr
/* A struct for writing lexer tests. */
struct lexer_test
class lexer_test
{
public:
lexer_test (const line_table_case &case_, const char *content,
lexer_test_options *options);
~lexer_test ();

View file

@ -175,8 +175,9 @@ void diagnostics_file_cache_fini (void);
void diagnostics_file_cache_forcibly_evict_file (const char *file_path);
struct GTY(()) string_concat
class GTY(()) string_concat
{
public:
string_concat (int num, location_t *locs);
int m_num;

View file

@ -130,7 +130,7 @@ template <typename valtype> class ipcp_value;
/* Describes a particular source for an IPA-CP value. */
template <typename valtype>
class ipcp_value_source
struct ipcp_value_source
{
public:
/* Aggregate offset of the source, negative if the source is scalar value of
@ -209,7 +209,7 @@ public:
contains_variable flag should be disregarded. */
template <typename valtype>
class ipcp_lattice
struct ipcp_lattice
{
public:
/* The list of known values and types in this lattice. Note that values are
@ -236,7 +236,7 @@ public:
/* Lattice of tree values with an offset to describe a part of an
aggregate. */
class ipcp_agg_lattice : public ipcp_lattice<tree>
struct ipcp_agg_lattice : public ipcp_lattice<tree>
{
public:
/* Offset that is being described by this lattice. */
@ -3385,8 +3385,9 @@ static call_summary <edge_clone_summary *> *edge_clone_summaries = NULL;
/* Edge clone summary. */
struct edge_clone_summary
class edge_clone_summary
{
public:
/* Default constructor. */
edge_clone_summary (): prev_clone (NULL), next_clone (NULL) {}

View file

@ -2626,8 +2626,9 @@ possible_polymorphic_call_targets_1 (vec <cgraph_node *> &nodes,
polymorphic calls in the program, so we memoize all the previous
queries and avoid duplicated work. */
struct polymorphic_call_target_d
class polymorphic_call_target_d
{
public:
HOST_WIDE_INT otr_token;
ipa_polymorphic_call_context context;
odr_type type;
@ -2949,8 +2950,9 @@ struct decl_warn_count
/* Information about type and decl warnings. */
struct final_warning_record
class final_warning_record
{
public:
/* If needed grow type_warnings vector and initialize new decl_warn_count
to have dyn_count set to profile_count::zero (). */
void grow_type_warnings (unsigned newlen);

View file

@ -72,8 +72,9 @@ struct agg_position_info
/* Representation of function body size and time depending on the call
context. We keep simple array of record, every containing of predicate
and time/size to account. */
struct GTY(()) size_time_entry
class GTY(()) size_time_entry
{
public:
/* Predicate for code to be executed. */
predicate exec_predicate;
/* Predicate for value to be constant and optimized out in a specialized copy.
@ -85,8 +86,9 @@ struct GTY(()) size_time_entry
};
/* Function inlining information. */
struct GTY(()) ipa_fn_summary
class GTY(()) ipa_fn_summary
{
public:
/* Keep all field empty so summary dumping works during its computation.
This is useful for debugging. */
ipa_fn_summary ()
@ -205,8 +207,9 @@ extern GTY(()) fast_function_summary <ipa_fn_summary *, va_gc>
*ipa_fn_summaries;
/* Information kept about callgraph edges. */
struct ipa_call_summary
class ipa_call_summary
{
public:
/* Keep all field empty so summary dumping works during its computation.
This is useful for debugging. */
ipa_call_summary ()

View file

@ -23,8 +23,9 @@ along with GCC; see the file COPYING3. If not see
/* Data we cache about callgraph edges during inlining to avoid expensive
re-computations during the greedy algorithm. */
struct edge_growth_cache_entry
class edge_growth_cache_entry
{
public:
sreal time, nonspec_time;
int size;
ipa_hints hints;

View file

@ -144,8 +144,9 @@ struct GTY(()) ipa_agg_jump_function
typedef struct ipa_agg_jump_function *ipa_agg_jump_function_p;
/* Information about zero/non-zero bits. */
struct GTY(()) ipa_bits
class GTY(()) ipa_bits
{
public:
/* The propagated value. */
widest_int value;
/* Mask corresponding to the value.
@ -156,8 +157,9 @@ struct GTY(()) ipa_bits
/* Info about value ranges. */
struct GTY(()) ipa_vr
class GTY(()) ipa_vr
{
public:
/* The data fields below are valid only if known is true. */
bool known;
enum value_range_kind type;
@ -319,8 +321,9 @@ struct GTY(()) ipa_param_descriptor
and some other information for interprocedural passes that operate on
parameters (such as ipa-cp). */
struct GTY((for_user)) ipa_node_params
class GTY((for_user)) ipa_node_params
{
public:
/* Default constructor. */
ipa_node_params ();

View file

@ -108,8 +108,9 @@ along with GCC; see the file COPYING3. If not see
/* Per basic block info. */
struct split_bb_info
class split_bb_info
{
public:
unsigned int size;
sreal time;
};
@ -118,8 +119,9 @@ static vec<split_bb_info> bb_info_vec;
/* Description of split point. */
struct split_point
class split_point
{
public:
/* Size of the partitions. */
sreal header_time, split_time;
unsigned int header_size, split_size;
@ -979,8 +981,9 @@ visit_bb (basic_block bb, basic_block return_bb,
/* Stack entry for recursive DFS walk in find_split_point. */
struct stack_entry
class stack_entry
{
public:
/* Basic block we are examining. */
basic_block bb;

View file

@ -597,8 +597,9 @@ extern int ira_copies_num;
/* The following structure describes a stack slot used for spilled
pseudo-registers. */
struct ira_spilled_reg_stack_slot
class ira_spilled_reg_stack_slot
{
public:
/* pseudo-registers assigned to the stack slot. */
bitmap_head spilled_regs;
/* RTL representation of the stack slot. */
@ -774,7 +775,8 @@ minmax_set_iter_next (minmax_set_iterator *i)
minmax_set_iter_cond (&(ITER), &(N)); \
minmax_set_iter_next (&(ITER)))
struct target_ira_int {
class target_ira_int {
public:
~target_ira_int ();
void free_ira_costs ();

View file

@ -58,8 +58,9 @@ along with GCC; see the file COPYING3. If not see
/* The data stored for the loop. */
struct loop_data
class loop_data
{
public:
struct loop *outermost_exit; /* The outermost exit of the loop. */
bool has_call; /* True if the loop contains a call. */
/* Maximal register pressure inside loop for given register class

View file

@ -85,8 +85,9 @@ enum iv_grd_result
/* Information about a biv. */
struct biv_entry
class biv_entry
{
public:
unsigned regno; /* The register of the biv. */
struct rtx_iv iv; /* Value of the biv. */
};

View file

@ -71,8 +71,9 @@ along with GCC; see the file COPYING3. If not see
/* This structure is used to record information about hard register
eliminations. */
struct lra_elim_table
class lra_elim_table
{
public:
/* Hard register number to be eliminated. */
int from;
/* Hard register number used as replacement. */

View file

@ -64,8 +64,9 @@ struct lra_copy
};
/* Common info about a register (pseudo or hard register). */
struct lra_reg
class lra_reg
{
public:
/* Bitmap of UIDs of insns (including debug insns) referring the
reg. */
bitmap_head insn_bitmap;
@ -210,8 +211,9 @@ struct lra_static_insn_data
/* LRA internal info about an insn (LRA internal insn
representation). */
struct lra_insn_recog_data
class lra_insn_recog_data
{
public:
/* The insn code. */
int icode;
/* The alternative should be used for the insn, LRA_UNKNOWN_ALT if

View file

@ -384,8 +384,9 @@ mark_regno_dead (int regno, machine_mode mode)
/* Structure describing local BB data used for pseudo
live-analysis. */
struct bb_data_pseudos
class bb_data_pseudos
{
public:
/* Basic block about which the below data are. */
basic_block bb;
bitmap_head killed_pseudos; /* pseudos killed in the BB. */

View file

@ -124,8 +124,9 @@ static cand_t *regno_cands;
/* Data about basic blocks used for the rematerialization
sub-pass. */
struct remat_bb_data
class remat_bb_data
{
public:
/* Basic block about which the below data are. */
basic_block bb;
/* Registers changed in the basic block: */

View file

@ -97,8 +97,9 @@ static struct pseudo_slot *pseudo_slots;
/* The structure describes a register or a stack slot which can be
used for several spilled pseudos. */
struct slot
class slot
{
public:
/* First pseudo with given stack slot. */
int regno;
/* Hard reg into which the slot pseudos are spilled. The value is

View file

@ -735,8 +735,9 @@ struct output_block
/* Data and descriptors used when reading from an LTO file. */
struct data_in
class data_in
{
public:
/* The global decls and types. */
struct lto_file_decl_data *file_data;

View file

@ -1,3 +1,9 @@
2019-07-09 Martin Sebor <msebor@redhat.com>
PR c++/61339
* lto-dump.c: Change class-key from class to struct and vice versa
to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
2019-07-04 Martin Liska <mliska@suse.cz>
PR lto/91078

View file

@ -38,8 +38,9 @@ along with GCC; see the file COPYING3. If not see
/* Stores details of symbols for dumping symbol list. */
struct symbol_entry
class symbol_entry
{
public:
symtab_node *node;
symbol_entry (symtab_node *node_): node (node_)
{}
@ -70,8 +71,9 @@ struct symbol_entry
/* Stores variable specific details of symbols for dumping symbol list. */
struct variable_entry: public symbol_entry
class variable_entry: public symbol_entry
{
public:
variable_entry (varpool_node *node_): symbol_entry (node_)
{}
@ -100,8 +102,9 @@ struct variable_entry: public symbol_entry
/* Stores function specific details of symbols for dumping symbol list. */
struct function_entry: public symbol_entry
class function_entry: public symbol_entry
{
public:
function_entry (cgraph_node *node_): symbol_entry (node_)
{}

View file

@ -31,8 +31,9 @@ class hash_map;
#define LOCATION_LINE_WIDTH 48
/* Memory allocation location. */
struct mem_location
class mem_location
{
public:
/* Default constructor. */
inline
mem_location () {}
@ -123,8 +124,9 @@ struct mem_location
};
/* Memory usage register to a memory location. */
struct mem_usage
class mem_usage
{
public:
/* Default constructor. */
mem_usage (): m_allocated (0), m_times (0), m_peak (0), m_instances (1) {}
@ -260,8 +262,9 @@ struct mem_usage
/* Memory usage pair that connectes memory usage and number
of allocated bytes. */
template <class T>
struct mem_usage_pair
class mem_usage_pair
{
public:
mem_usage_pair (T *usage_, size_t allocated_): usage (usage_),
allocated (allocated_) {}

View file

@ -83,8 +83,9 @@ omp_grid_lastprivate_predicate (struct omp_for_data *fd)
/* Structure describing the basic properties of the loop we ara analyzing
whether it can be gridified and when it is gridified. */
struct grid_prop
class grid_prop
{
public:
/* True when we are doing tiling gridification, i.e. when there is a distinct
distribute loop over groups and a loop construct over work-items. False
when distribute and parallel for loops form a combined construct. */

View file

@ -3777,7 +3777,8 @@ omp_clause_aligned_alignment (tree clause)
/* This structure is part of the interface between lower_rec_simd_input_clauses
and lower_rec_input_clauses. */
struct omplow_simd_context {
class omplow_simd_context {
public:
omplow_simd_context () { memset (this, 0, sizeof (*this)); }
tree idx;
tree lane;

View file

@ -144,8 +144,9 @@ get_vcond_eq_icode (machine_mode vmode, machine_mode cmode)
enum extraction_pattern { EP_insv, EP_extv, EP_extzv };
/* Describes an instruction that inserts or extracts a bitfield. */
struct extraction_insn
class extraction_insn
{
public:
/* The code of the instruction. */
enum insn_code icode;

View file

@ -41,7 +41,8 @@ enum expand_operand_type {
};
/* Information about an operand for instruction expansion. */
struct expand_operand {
class expand_operand {
public:
/* The type of operand. */
ENUM_BITFIELD (expand_operand_type) type : 8;

View file

@ -1282,8 +1282,9 @@ wrap_help (const char *help,
/* Data structure used to print list of valid option values. */
struct option_help_tuple
class option_help_tuple
{
public:
option_help_tuple (int code, vec<const char *> values):
m_code (code), m_values (values)
{}
@ -1801,8 +1802,9 @@ const struct sanitizer_opts_s coverage_sanitizer_opts[] =
/* A struct for describing a run of chars within a string. */
struct string_fragment
class string_fragment
{
public:
string_fragment (const char *start, size_t len)
: m_start (start), m_len (len) {}

View file

@ -335,7 +335,7 @@ struct poly_result<T1, T2, 2>
/* A base POD class for polynomial integers. The polynomial has N
coefficients of type C. */
template<unsigned int N, typename C>
class poly_int_pod
struct poly_int_pod
{
public:
template<typename Ca>

View file

@ -3236,8 +3236,9 @@ predict_paths_leading_to_edge (edge e, enum br_predictor pred,
/* This is used to carry information about basic blocks. It is
attached to the AUX field of the standard CFG block. */
struct block_info
class block_info
{
public:
/* Estimated frequency of execution of basic_block. */
sreal frequency;
@ -3249,8 +3250,9 @@ struct block_info
};
/* Similar information for edges. */
struct edge_prob_info
class edge_prob_info
{
public:
/* In case edge is a loopback edge, the probability edge will be reached
in case header is. Estimated number of iterations of the loop can be
then computed as 1 / (1 - back_edge_prob). */

View file

@ -74,8 +74,9 @@ struct chunk_info
/* The output buffer datatype. This is best seen as an abstract datatype
whose fields should not be accessed directly by clients. */
struct output_buffer
class output_buffer
{
public:
output_buffer ();
~output_buffer ();
@ -214,8 +215,9 @@ class format_postprocessor
/* The data structure that contains the bare minimum required to do
proper pretty-printing. Clients may derived from this structure
and add additional fields they need. */
struct pretty_printer
class pretty_printer
{
public:
/* Default construct a pretty printer with specified
maximum line length cut off limit. */
explicit pretty_printer (int = 0);

View file

@ -676,7 +676,7 @@ public:
class sreal;
class GTY(()) profile_count
struct GTY(()) profile_count
{
public:
/* Use 62bit to hold basic block counters. Should be at least

Some files were not shown because too many files have changed in this diff Show more