]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
PR c++/61339 - add mismatch between struct and class [-Wmismatched-tags] to non-bugs
authorMartin Sebor <msebor@redhat.com>
Tue, 9 Jul 2019 16:36:00 +0000 (16:36 +0000)
committerMartin Sebor <msebor@gcc.gnu.org>
Tue, 9 Jul 2019 16:36:00 +0000 (10:36 -0600)
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

145 files changed:
gcc/ChangeLog
gcc/align.h
gcc/alloc-pool.h
gcc/asan.c
gcc/auto-profile.c
gcc/basic-block.h
gcc/bitmap.h
gcc/c-family/ChangeLog
gcc/c-family/c-format.c
gcc/c-family/c-pretty-print.h
gcc/c/ChangeLog
gcc/c/c-decl.c
gcc/c/gimple-parser.c
gcc/cfgexpand.c
gcc/cfghooks.h
gcc/cfgloop.h
gcc/cgraph.h
gcc/config/i386/i386.h
gcc/cp/ChangeLog
gcc/cp/constexpr.c
gcc/cp/constraint.cc
gcc/cp/cp-tree.h
gcc/cp/cxx-pretty-print.h
gcc/cp/error.c
gcc/cp/logic.cc
gcc/cp/name-lookup.c
gcc/cp/pt.c
gcc/cp/search.c
gcc/cp/semantics.c
gcc/df-problems.c
gcc/df-scan.c
gcc/df.h
gcc/diagnostic-show-locus.c
gcc/dojump.h
gcc/dse.c
gcc/dump-context.h
gcc/dumpfile.h
gcc/dwarf2out.c
gcc/edit-context.c
gcc/fibonacci_heap.c
gcc/flags.h
gcc/function.c
gcc/function.h
gcc/gcc.c
gcc/gcov.c
gcc/genattrtab.c
gcc/genextract.c
gcc/genmatch.c
gcc/genoutput.c
gcc/genpreds.c
gcc/genrecog.c
gcc/gensupport.c
gcc/gensupport.h
gcc/ggc-common.c
gcc/ggc-tests.c
gcc/gimple-loop-interchange.cc
gcc/gimple-loop-versioning.cc
gcc/gimple-match.h
gcc/gimple-ssa-backprop.c
gcc/gimple-ssa-sprintf.c
gcc/gimple-ssa-store-merging.c
gcc/gimple-ssa-strength-reduction.c
gcc/gimple-ssa-warn-alloca.c
gcc/gimple-ssa-warn-restrict.c
gcc/godump.c
gcc/hash-map-tests.c
gcc/hash-map.h
gcc/hash-set-tests.c
gcc/hsa-brig.c
gcc/hsa-common.h
gcc/hsa-gen.c
gcc/input.c
gcc/input.h
gcc/ipa-cp.c
gcc/ipa-devirt.c
gcc/ipa-fnsummary.h
gcc/ipa-inline.h
gcc/ipa-prop.h
gcc/ipa-split.c
gcc/ira-int.h
gcc/loop-invariant.c
gcc/loop-iv.c
gcc/lra-eliminations.c
gcc/lra-int.h
gcc/lra-lives.c
gcc/lra-remat.c
gcc/lra-spills.c
gcc/lto-streamer.h
gcc/lto/ChangeLog
gcc/lto/lto-dump.c
gcc/mem-stats.h
gcc/omp-grid.c
gcc/omp-low.c
gcc/optabs-query.h
gcc/optabs.h
gcc/opts.c
gcc/poly-int.h
gcc/predict.c
gcc/pretty-print.h
gcc/profile-count.h
gcc/read-md.h
gcc/read-rtl-function.c
gcc/ree.c
gcc/reginfo.c
gcc/regrename.c
gcc/regrename.h
gcc/reload.h
gcc/rtl-iter.h
gcc/rtl.h
gcc/sanopt.c
gcc/sched-int.h
gcc/sel-sched-ir.h
gcc/selftest.h
gcc/sese.h
gcc/stmt.c
gcc/target-globals.h
gcc/tree-affine.c
gcc/tree-affine.h
gcc/tree-data-ref.h
gcc/tree-outof-ssa.c
gcc/tree-predcom.c
gcc/tree-scalar-evolution.c
gcc/tree-ssa-alias.h
gcc/tree-ssa-ccp.c
gcc/tree-ssa-coalesce.c
gcc/tree-ssa-loop-im.c
gcc/tree-ssa-loop-ivopts.c
gcc/tree-ssa-loop.h
gcc/tree-ssa-pre.c
gcc/tree-ssa-structalias.c
gcc/tree-switch-conversion.h
gcc/tree-vect-patterns.c
gcc/tree-vectorizer.c
gcc/tree-vectorizer.h
gcc/tree.c
gcc/tree.h
gcc/unique-ptr-tests.cc
gcc/var-tracking.c
gcc/varasm.c
gcc/vec.c
gcc/wide-int-bitmask.h
gcc/wide-int.h
libcpp/ChangeLog
libcpp/include/line-map.h
libcpp/mkdeps.c

index 63f50e89b9d0de4b2fa49a53b0ce297629551005..1606b91039123006a2d689862e9021fb8d750a2c 100644 (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
index 67684513c7ed06ae46ffcbbb2a5b62182c8ff94f..6c98e2d9646f3acf837e082bab6b73569d4515db 100644 (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)
   {
index d32081003163872a0bc880f1b751837ea2adaf96..d8878b6b7427533ea9da43fd8be61334894d3622 100644 (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.  */
index 605d04f87f7b9997129aa9122b0ad53d1aa27668..a731bd490b4e78e916ae20fc9a0249c1fc04daa5 100644 (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),
index 26353a21486250b9f3d1605858907bc1827cdf5e..59100a0a47dd5d38b2c1872e2fac343f8b16de12 100644 (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;
 
index fba5526294e3adc359e12fde45c951ae93d29a32..964f2bd5784a261bb9acf110ca38ed617f269b17 100644 (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;
index 39f509db611edc1708484b76043cc9ae30d39dc8..0e3ffc8862f466ec4aae70db9658e29d83c1e08d 100644 (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()
index 84d1f2e4f1d14a3c35c1c046180baaaadd267592..4d8f967b3410135afd3ce0847c0d304800b43771 100644 (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
index 6363fa4f686c2d56886dc66ea6d7ce1321c20ecd..d134116d598b12fd7a544a508f31779f8e4e9a9b 100644 (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;
index 6084dcf9c0652adeb90ca152d41e8e2d1e205a88..8c516c3e56b81eca2d66ff45c8902289520d8d0c 100644 (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.
index 271ed4ba3e90f76814c170dd181e719491754051..d2645a84decd48eda36d36f747a62cd6791de2ca 100644 (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
index cb2f49fa5a2c1da3a9c223523aaec805050ade4e..35e15ba2a8b48b869775c561a6a0b5c1e0a6feb1 100644 (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;
index b2b364cc41a383f54c12cd84666da84665357fac..e388d93b9e2e3315fb4b1571d887c251d4054f7b 100644 (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;
index 1e84d2c4a4efd5927b02766fb95dd94068752074..0128fca4e2bdbef34147a43229c44c49efc672f9 100644 (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.  */
index e9385c99443846df52fd92c616d5e29cbc14c3a0..9ed0c3631585b86cdfa1cff9344397cb3ba5d9f3 100644 (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; }
 
index 2f8ab106d03a8927087ee8038e08a825f6e1e237..941407020550f523396a0e3ccb9d9170576db049 100644 (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 ();
 
index 18839a4a5ecf6c2451356f0b5cfd4146b59bafae..e5fd6dd133cb544561513db4e8575640c3f35423 100644 (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);
 
index 1f70844fc45cff8e73f9ac0a65bdc6b9d8df2223..a2fcdd4c644a5244b0a213c27a86722a3f1f1614 100644 (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;
index 0fcbfe507e13ee5c53cbb359562285db61c36d50..2dd3893f8ac0accfc0fe3f1099ed39d52642fc96 100644 (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
index d11e7af3eb11124002fde6d053bf21a3bcb21184..c1b8b9b8a5d635b55e03a535bc25a98cc6c8c920 100644 (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) { }
index ed39ecce7179263bdfedd0b5757d7c1a254ddb74..cc578bb5b39b964a2ecc9322491b50827d074b6b 100644 (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;
index e814bc973f85844244536c67c30e3425735e19ee..970296df010853772720c4f5cc0d5d32fdc7ffb6 100644 (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);
index aba3e84435f832c8167247bb3310c6682e4a79c1..347811fe735d9384e1f339e61998c88c641a8eb5 100644 (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);
index baeba7e17221b388db520af118576c277059ba57..5943762fd2d9e58e8df65b89452650655e293e4a 100644 (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)
   {}
index 2ace8c3e157f71357ac846ecbfb5122507546d74..13cc321243677cdc8c07eeb8507c5e6261ecddbf 100644 (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);
index f4c34ed6a29ba49a7fb235a415aeac70c2bffe72..ad866298fa5d44c65760663f5e7da2a553ec2c8e 100644 (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;
index c5161a7782f16b90dcb514e77a1a766a29b4e5c6..c0a048720019602b07870ef351ca3d57e41684bd 100644 (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;
index 372c4424747b9bc28f40ecc0a2bf5979a9109dd8..a737e242b1ce66856f7b331cf76685c5c8b4c7d6 100644 (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_) {}
 
index cd24490bc6b7a7e366f45395d5d7d00f78b1dc9b..ceb6c6417506bd314bc7a4305bbe118ab033c80a 100644 (file)
@@ -4380,8 +4380,9 @@ expand_or_defer_fn (tree fn)
     }
 }
 
-struct nrv_data
+class nrv_data
 {
+public:
   nrv_data () : visited (37) {}
 
   tree var;
index a9dfa6203cfd535c57248921ddb33fed6697570d..62b2cf6162f6114714320cf2901b556c92582450 100644 (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.  */
index 81e221ee38fbcc4fa6034b18006df59182074454..ffaca0b66fd739188025994637a0bc3e4a1d58ee 100644 (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;
index d76d31baa84d2b1134707d932b43905949151ae9..13358f9ad3c15a7dd9cc864447baed9dde3b1ce5 100644 (file)
--- a/gcc/df.h
+++ b/gcc/df.h
@@ -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.  */
index 89074beb6d10c3995e26e839130a7b4341a3c586..4d563dda8f420d22e97836a95be6b3709d0e90dc 100644 (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); }
index ad019293e17725b4f6cb71c2dd45b084006df0f9..f4dbc111c3f29fa56320d914ea9cd2e08d340f1d 100644 (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;
 
index 6f6f768f37112df2b2aee18ce722bcc8865dd43c..a3cefbf527fa9e87089ed068185d5a0edd915717 100644 (file)
--- a/gcc/dse.c
+++ b/gcc/dse.c
@@ -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;
 
index b17b86a400fdf5cf48784ca4c98467cdda981e0e..bb856c64dafe1c9a1cd2c7b319c653ef75cd6756 100644 (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;
index 9bcaa25b0a5ba7aab358f4cb8f6ff093f782fe3a..8614483f36d087f3c0cbd568636e975655eaeed7 100644 (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 (),
index 2c4cc6ccf899b7044bae31fa398ad9aac112bcf3..0449c2b2912685339eb4cd95320a4ea2ff14d0b5 100644 (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)
     {
index 93d10664ae9cc6eec71ea0b3ac05ec29eb5da00e..4cd26c95e213fd75b063ca7a2a2d936a5d146033 100644 (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) {}
 
index aec6913a871e06b16bb8832d155f64e339e681da..bddd047769426a1ee8faf955574ab6aa7aaba4fd 100644 (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)
   {
   }
index 0ea1812d33e5efd3be1c853495bfbde2fc51f7ea..0cc7df2666c49c69e378b2d6068d386ba6028aaf 100644 (file)
@@ -42,8 +42,9 @@ extern bool final_insns_dump_p;
 \f
 /* 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;
index 0bce4ec68395f43c2192d5c65a54b2cc5c5a11bd..b44c4d0ee339cb270582b8913e00d248e628bed6 100644 (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.  */
index bfe9919a760fb3412c7ceda21dd3ce35d1740280..c2596bf48d58a4d4b185af7e2bd36d5574da6b33 100644 (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;
 
index 0c0a686eb9c53fce8ca063aa6029fab68e4396e3..a4323eb146edfd07a3c9817e65e84bcc4168a222 100644 (file)
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -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);
index b06a6714c2e5b2af4d7d24d5fcf201898e4c7768..1d9d3b25b5d01f2d571233d9bb5dcc3d6879c5d9 100644 (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 ();
 
index 78816ba317946ca346c532fb64ed0d9b4928d3fe..604526d68088cefe9e3b43a69712cfd4d48d1905 100644 (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.  */
index b26f56aa258f3d3cf0bd4f8375446dd6736cf7ce..66886f6fc91ea5354aaa2fc7f872c70bddcd1e9b 100644 (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;
index 109bd9e6f2d947ff709f86cd9e0b20051e48fa55..7403ccb7482a6a6071d12afe16bb7c57fb0db1fb 100644 (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 *);
index 37ee5093809e243520dd9b66ef11207cdb94acfa..ab4c46a51f14f0708a4e7f5aa998895609fa3011 100644 (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;
index 19b7dcb7a304c5ae6aa8dab64cbd60b348696b00..293930c695d500479f68010f88ae10dfad7393a0 100644 (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;
index 90e2508fa05ee177fbfde3bb3b98f4eebc5907d5..a3b8e683c6310b6516ac4e7df0c6bbea52954df9 100644 (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;
 
index 0150346d40915ae54b7707556a638f54e725a7e5..07aa8391f281d5d9feefd07748796970c2c98f35 100644 (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;
index 5c432036e6a56453f25eb5a83df57b7dd6724e48..10a5c7a9073fe92fe48ee8625a7cfdfee0ab507a 100644 (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;
 
index 6fb5a3d5ceb21d56956addd9093a6a63212c38eb..0968d9769faeb31c622bccc39ad66b1b0408fb8b 100644 (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.  */
index 752f44679993a69da63e31c7910c199cf994ba85..1ea5e4cfc10685def6f4de1bfffdc33f912caf40 100644 (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++; }
index b188ce86d5e307d4f9f455e0caf74bf3b75bdca4..1324489e85a13ed492b012acbdb027ef4daf3d2b 100644 (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 ();
 
index fe2730014234ce15e8ee0bb011b69269d04c62cf..468f5860d69e0d7dda4c49b8a1f26d5d531e65d5 100644 (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
index ad7f73040f12fc2876e98319688488cde01cba83..ea0f66f06b10092c996d269d66bd087e74995779 100644 (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 &,
index 30fb7cbc96bad606d64f917d2f7ac864fc02955e..0aeac4e1c4c91a14f14cdfed6b99dd5e294596fd 100644 (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;
index a0934bcaf87c05f6c52cd50139e3b5200b3e8d53..6ba3d86f211ec4000be769b8d52031bca564f21c 100644 (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)
index 5a93830ab4bf87750e7c4c73f7b9d236ff807780..1f50e3af03e33bf38ffbb0c3f429fbf44a812609 100644 (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;
index bfda44a102881f51a473ddd0177bac8de96c74af..aa5a8567a1bef74f36d2b3c4392883313ac9aa2b 100644 (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;
 
index d80414613368ce5d490b090bc9aee91a8e59a858..73726c1a67017ee524397dac6d469c7fe3ae55d4 100644 (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
index 0c571efb666590e6f3352ad6d7a8dc826414f733..64175f258ae73a08c38d8740df172ead9cad4d43 100644 (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
index 617a96486cd07daea82cc3d8b8aaed10ca8e36d1..39cce5e6b361d545b0f231c202dfedfdc0898630 100644 (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;
 
index 5888f259b2077ce3e0c47db40c25ee6b53671edf..f3b216be07ca8304991cc17d8e1446667c2ef1ee 100644 (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;
index f3f1f9a89ff697e0526e9b00d1864ecd33016843..ba20fe79f230639e82a2d1f1c334a06233e256a3 100644 (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;
 
index c96fe538d9ff7f301625a9346f3b3c71cd6d7508..ce59059bee15c744fc866e1a130c58647056c859 100644 (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;
index 016e61f7d6af1a2956057ce44155577b24d10417..424eac7ef471c33252b1ac8c570ffcdca33b0b30 100644 (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) {}
 
index 9c61786a78c0fae59e08eaf8393437d9d87bfed6..121c4eab8e7a91f896dbe65ed91333833b1401b5 100644 (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 ();
 
index f52c49c3fa2a1b4bed776fbd1e452917e0fd3537..54d98a5f50797f168e25c5625f6d55ff4e34b79a 100644 (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)
   {}
index 1e84d2ee2d149354fb961cd2b3edddb4085a6562..baab42af9aef6691f1f7e9414a68ce3e27b4ddef 100644 (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 ();
index 3c7cf3673a4fe3f1e0b59919c5abff89fd5cea1d..3e038207bd01ce9cc08aa73209b55ecefc474094 100644 (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;
index b6e781f74509137547f39bb9e89f3efbe180992a..e62a9a03ef953d86a2ba7c59e7d3c2af14e704f1 100644 (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) {}
 
index 252d9206181ebdd61dc7ca80e4d4a0e391b510fd..a5e3a63b66d417cb46a2fc26b4617031a383fc3c 100644 (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);
index 0f08e84ed535c95256c75a638611c82a82280e25..7b077042b8eca062907a3be255135e03fcace8e2 100644 (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 ()
index f6eb677d61858b5ccb156d1d8e23329297c2953e..18c8e1eebd0cbcd0099cdf100501dbcc143fb0f3 100644 (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;
index 7257a6d04f141ddd25b75947231ecc1666cad5c8..7605911f701733915ee23bf7f948bd86a57aaf18 100644 (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 ();
 
index 5eaf8257f9884113fea8b5b4990c3b0506094110..44ae2c7d07727bfa6b69ac85789ab5b98170c6ae 100644 (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;
 
index 1ea35f7e364f14c425ceb7752a3e4a53a354a641..08848f0e81755676bf3a19ff03c51f22de5f49f7 100644 (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)))
 \f
-struct target_ira_int {
+class target_ira_int {
+public:
   ~target_ira_int ();
 
   void free_ira_costs ();
index b880ead3d15fad0cd7f56712705be3e3d3c67f87..4fc73d4917bbe081d7a6f3c04180164d5b9a343c 100644 (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
index 207b5e2bfa384427ea3ecd3d9ed3842d6acaf7db..f078a68d8bfd33bd6cf294103d6ee86e7bfb1f38 100644 (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.  */
 };
index 051839a2717663e44d0e177aed2ea1819dfc2498..e583bca426147dc9f387b313fc37a29e0d1b0554 100644 (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. */
index d0a8facc50e5ec429fa5e3b6ddb0ef80fe6b22c7..cc47c4daba2e2b3ddcdd250ca6c511392773d912 100644 (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
index 55b2adc2a5beca5953ffbc276041440e563337aa..975e5230a91989194335bb411bd108b48f502d77 100644 (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.  */
index 10838116143e50878ac8c08d3a57997c5ec93ff1..51d3543efdc5b4159b2c198d77d58bc7c9479713 100644 (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: */
index c19b76a579cf7285096031db1801059c6d578c7a..5db94dc862950ebb468f54dd7ab88aa5cac99a69 100644 (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
index f1593d64c7120aea3ddf2cc7221171bf6485fc9c..d5dbeb73b32542145c8c841eec37a9961e2daa60 100644 (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;
 
index 871598cae510fe3c986235ea4b9fea49c497b2ce..f3796f56b77fb80a2989ec4576cb4c1c25c567bd 100644 (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
index e9de33cf5d81227a3d5f08dd215150c1bd1fcaf1..262f9f24d852adfb15802826a5696346ae0ddc01 100644 (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_)
   {}
 
index 7796059575377ccc77c5198cfddda7d9d948fcd6..9ceb9ccc55b3d3c302e1908e119f655f41b8be54 100644 (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_) {}
 
index 1ff65aa160cd9cc385c6668d0d07d8946c233e2f..898d73f8a6059deeea7ce4a92cde62ea45244377 100644 (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.  */
index 3fe466fae0367a4e1cba4e0957e4d5eb961fe73d..a855c5b2f8b959e861ff5137ac0ff7d8c8ccc4b6 100644 (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;
index b0f50a9eb0f89afb103f8912ca2fb38388f33ddf..d998fcaf7db1934b7ff896f8fd32bf564a01b23e 100644 (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;
 
index 17b5dfb67fd23ab62bce9da92b1ca273ae218b14..ca7e06366f3a29f4ab831945701aabe12ab1bb89 100644 (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;
 
index b38bfb15a56b82cd63d2b378582fb527ed4df7bd..46a19a278871178bce85e1f601a5f695d9e6b28f 100644 (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) {}
 
index d68a652b5fa785bbd855400a5993c0624193d126..635f1ebeef691c770087f730625868c4ccfbe6c9 100644 (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>
index ad19d1295e030b4d18e5424237be26460ee2b510..766f418aa691fb1b0a55ff9ae31cf63541ab0c0b 100644 (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).  */
index e4df6590719a8813e47bf50e23f762a19bb0c9ba..2d03b3f9e8def388cce022ecb375738359bdd2fe 100644 (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);
index cbab5965ed635604a425edffe6a3adf663a81b74..e584aab641f3c5bd2c892aa89a44d9c0b72dc02b 100644 (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
index 327f378eac0345ffcac48d5ce157abd94e8b255f..9cb75694ffe8bb4fc01f089668e919cb93657668 100644 (file)
@@ -23,7 +23,8 @@ along with GCC; see the file COPYING3.  If not see
 #include "obstack.h"
 
 /* Records a position in the file.  */
-struct file_location {
+class file_location {
+public:
   file_location () {}
   file_location (const char *, int, int);
 
index 3cf34ba99a84b75bdb78e4267e02dbb496cd9f63..f41f54a0d4a5b10349f23f6e85482c78b744d66b 100644 (file)
@@ -52,8 +52,9 @@ class fixup;
    at LOC, which will be turned into an actual CFG edge once
    the "insn-chain" is fully parsed.  */
 
-struct deferred_edge
+class deferred_edge
 {
+public:
   deferred_edge (file_location loc, int src_bb_idx, int dest_bb_idx, int flags)
   : m_loc (loc), m_src_bb_idx (src_bb_idx), m_dest_bb_idx (dest_bb_idx),
     m_flags (flags)
index 104f8dbf4357fbdd09d0eecba6f349570fde61ad..c63e1591ae31dd3d9d58e42f49b4fd576fad005f 100644 (file)
--- a/gcc/ree.c
+++ b/gcc/ree.c
@@ -579,8 +579,9 @@ struct ATTRIBUTE_PACKED ext_modified
 };
 
 /* Vectors used by combine_reaching_defs and its helpers.  */
-struct ext_state
+class ext_state
 {
+public:
   /* In order to avoid constant alloc/free, we keep these
      4 vectors live through the entire find_and_remove_re and just
      truncate them each time.  */
index bec2d40fe9553fa748723a8006e261e8256493d7..4832affd436ac0a4a2631f55a7d721e61310a4c8 100644 (file)
@@ -50,8 +50,9 @@ int max_regno;
 
 /* Used to cache the results of simplifiable_subregs.  SHAPE is the input
    parameter and SIMPLIFIABLE_REGS is the result.  */
-struct simplifiable_subreg
+class simplifiable_subreg
 {
+public:
   simplifiable_subreg (const subreg_shape &);
 
   subreg_shape shape;
index 5259d565e582730d59108f9d8a7de718bc04d1ab..7dbbeb91a6d480c45e039320b785c013cb024495 100644 (file)
@@ -547,8 +547,9 @@ struct incoming_reg_info {
    A pointer to such a structure is stored in each basic block's aux field
    during regrename_analyze, except for blocks we know can't be optimized
    (such as entry and exit blocks).  */
-struct bb_rename_info
+class bb_rename_info
 {
+public:
   /* The basic block corresponding to this structure.  */
   basic_block bb;
   /* Copies of the global information.  */
index 37f5e398ded72d617627ad195a4dd46c816904ea..e9f28236cde6b9c08b1171d88d6057eda8cf4f9d 100644 (file)
@@ -22,8 +22,9 @@ along with GCC; see the file COPYING3.  If not see
 
 /* We keep linked lists of DU_HEAD structures, each of which describes
    a chain of occurrences of a reg.  */
-struct du_head
+class du_head
 {
+public:
   /* The next chain.  */
   struct du_head *next_chain;
   /* The first and last elements of this chain.  */
index 813075b6f00d1b02956aba22d9ed2fd71cbe528a..edfeebfff0e0bae8abed70687e0e6855c02ef651 100644 (file)
@@ -278,8 +278,9 @@ extern int num_not_at_initial_offset;
 /* This structure describes instructions which are relevant for reload.
    Apart from all regular insns, this also includes CODE_LABELs, since they
    must be examined for register elimination.  */
-struct insn_chain
+class insn_chain
 {
+public:
   /* Links to the neighbor instructions.  */
   struct insn_chain *next, *prev;
 
index e48ae4f8bfee471ef7baa4d877a7022620e9e488..ba5e692f70c2ef2a4e7427ffe33705dad5d048a6 100644 (file)
@@ -56,8 +56,9 @@ class generic_subrtx_iterator
   typedef typename T::rtunion_type rtunion_type;
 
 public:
-  struct array_type
+  class array_type
   {
+  public:
     array_type ();
     ~array_type ();
     value_type stack[LOCAL_ELEMS];
index a4fde4ed8e5b3b5b2426a27b8e7023d6676b607b..ad2f3cd5de66fd123b304425e5bff0c3a89ebb28 100644 (file)
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -145,8 +145,9 @@ struct addr_diff_vec_flags
 /* Structure used to describe the attributes of a MEM.  These are hashed
    so MEMs that the same attributes share a data structure.  This means
    they cannot be modified in place.  */
-struct GTY(()) mem_attrs
+class GTY(()) mem_attrs
 {
+public:
   mem_attrs ();
 
   /* The expression that the MEM accesses, or null if not known.
@@ -187,7 +188,8 @@ struct GTY(()) mem_attrs
    object in the low part of a 4-byte register, the OFFSET field
    will be -3 rather than 0.  */
 
-struct GTY((for_user)) reg_attrs {
+class GTY((for_user)) reg_attrs {
+public:
   tree decl;                   /* decl corresponding to REG.  */
   poly_int64 offset;           /* Offset from start of DECL.  */
 };
@@ -449,8 +451,9 @@ struct GTY((desc("0"), tag("0"),
 
 /* A node for constructing singly-linked lists of rtx.  */
 
-class GTY(()) rtx_expr_list : public rtx_def
+struct GTY(()) rtx_expr_list : public rtx_def
 {
+private:
   /* No extra fields, but adds invariant: (GET_CODE (X) == EXPR_LIST).  */
 
 public:
@@ -469,8 +472,9 @@ is_a_helper <rtx_expr_list *>::test (rtx rt)
   return rt->code == EXPR_LIST;
 }
 
-class GTY(()) rtx_insn_list : public rtx_def
+struct GTY(()) rtx_insn_list : public rtx_def
 {
+private:
   /* No extra fields, but adds invariant: (GET_CODE (X) == INSN_LIST).
 
      This is an instance of:
@@ -501,8 +505,9 @@ is_a_helper <rtx_insn_list *>::test (rtx rt)
 /* A node with invariant GET_CODE (X) == SEQUENCE i.e. a vector of rtx,
    typically (but not always) of rtx_insn *, used in the late passes.  */
 
-class GTY(()) rtx_sequence : public rtx_def
+struct GTY(()) rtx_sequence : public rtx_def
 {
+private:
   /* No extra fields, but adds invariant: (GET_CODE (X) == SEQUENCE).  */
 
 public:
@@ -533,7 +538,7 @@ is_a_helper <const rtx_sequence *>::test (const_rtx rt)
   return rt->code == SEQUENCE;
 }
 
-class GTY(()) rtx_insn : public rtx_def
+struct GTY(()) rtx_insn : public rtx_def
 {
 public:
   /* No extra fields, but adds the invariant:
@@ -567,7 +572,7 @@ public:
 
 /* Subclasses of rtx_insn.  */
 
-class GTY(()) rtx_debug_insn : public rtx_insn
+struct GTY(()) rtx_debug_insn : public rtx_insn
 {
   /* No extra fields, but adds the invariant:
        DEBUG_INSN_P (X) aka (GET_CODE (X) == DEBUG_INSN)
@@ -578,7 +583,7 @@ class GTY(()) rtx_debug_insn : public rtx_insn
      from rtl.def.  */
 };
 
-class GTY(()) rtx_nonjump_insn : public rtx_insn
+struct GTY(()) rtx_nonjump_insn : public rtx_insn
 {
   /* No extra fields, but adds the invariant:
        NONJUMP_INSN_P (X) aka (GET_CODE (X) == INSN)
@@ -589,7 +594,7 @@ class GTY(()) rtx_nonjump_insn : public rtx_insn
      from rtl.def.  */
 };
 
-class GTY(()) rtx_jump_insn : public rtx_insn
+struct GTY(()) rtx_jump_insn : public rtx_insn
 {
 public:
   /* No extra fields, but adds the invariant:
@@ -616,7 +621,7 @@ public:
   inline void set_jump_target (rtx_code_label *);
 };
 
-class GTY(()) rtx_call_insn : public rtx_insn
+struct GTY(()) rtx_call_insn : public rtx_insn
 {
   /* No extra fields, but adds the invariant:
        CALL_P (X) aka (GET_CODE (X) == CALL_INSN)
@@ -629,7 +634,7 @@ class GTY(()) rtx_call_insn : public rtx_insn
      from rtl.def.  */
 };
 
-class GTY(()) rtx_jump_table_data : public rtx_insn
+struct GTY(()) rtx_jump_table_data : public rtx_insn
 {
   /* No extra fields, but adds the invariant:
        JUMP_TABLE_DATA_P (X) aka (GET_CODE (INSN) == JUMP_TABLE_DATA)
@@ -640,8 +645,6 @@ class GTY(()) rtx_jump_table_data : public rtx_insn
        DEF_RTL_EXPR(JUMP_TABLE_DATA, "jump_table_data", "uuBe0000", RTX_INSN)
      from rtl.def.  */
 
-public:
-
   /* This can be either:
 
        (a) a table of absolute jumps, in which case PATTERN (this) is an
@@ -657,7 +660,7 @@ public:
   inline scalar_int_mode get_data_mode () const;
 };
 
-class GTY(()) rtx_barrier : public rtx_insn
+struct GTY(()) rtx_barrier : public rtx_insn
 {
   /* No extra fields, but adds the invariant:
        BARRIER_P (X) aka (GET_CODE (X) == BARRIER)
@@ -668,7 +671,7 @@ class GTY(()) rtx_barrier : public rtx_insn
      from rtl.def.  */
 };
 
-class GTY(()) rtx_code_label : public rtx_insn
+struct GTY(()) rtx_code_label : public rtx_insn
 {
   /* No extra fields, but adds the invariant:
        LABEL_P (X) aka (GET_CODE (X) == CODE_LABEL)
@@ -679,7 +682,7 @@ class GTY(()) rtx_code_label : public rtx_insn
      from rtl.def.  */
 };
 
-class GTY(()) rtx_note : public rtx_insn
+struct GTY(()) rtx_note : public rtx_insn
 {
   /* No extra fields, but adds the invariant:
        NOTE_P(X) aka (GET_CODE (X) == NOTE)
@@ -2096,7 +2099,8 @@ costs_add_n_insns (struct full_rtx_costs *c, int n)
    inner_mode == the mode of the SUBREG_REG
    offset     == the SUBREG_BYTE
    outer_mode == the mode of the SUBREG itself.  */
-struct subreg_shape {
+class subreg_shape {
+public:
   subreg_shape (machine_mode, poly_uint16, machine_mode);
   bool operator == (const subreg_shape &) const;
   bool operator != (const subreg_shape &) const;
index 5cb98e1b50e4e1644072bd18d74797c3cac43c3f..bf9fdc9cb8354c8aeb542573ffe27fb4a0f8f0b3 100644 (file)
@@ -207,8 +207,9 @@ struct sanopt_tree_couple_hash : typed_noop_remove <sanopt_tree_couple>
 /* This is used to carry various hash maps and variables used
    in sanopt_optimize_walker.  */
 
-struct sanopt_ctx
+class sanopt_ctx
 {
+public:
   /* This map maps a pointer (the first argument of UBSAN_NULL) to
      a vector of UBSAN_NULL call statements that check this pointer.  */
   hash_map<tree, auto_vec<gimple *> > null_check_map;
index 3ca5e263ab482bc1309513fc39baeee5eccd3413..5fef221a0ea7e49c926404b2b92311017d6267ba 100644 (file)
@@ -454,8 +454,9 @@ struct deps_reg
 };
 
 /* Describe state of dependencies used during sched_analyze phase.  */
-struct deps_desc
+class deps_desc
 {
+public:
   /* The *_insns and *_mems are paired lists.  Each pending memory operation
      will have a pointer to the MEM rtx on one list and a pointer to the
      containing insn on the other list in the same place in the list.  */
index 5dd273f40a43c7d9a4e15ff35d383f13fe037f37..2a24a920991c16a094814a2ee3a73a77e729fcbb 100644 (file)
@@ -713,8 +713,9 @@ struct transformed_insns
 
 /* Indexed by INSN_LUID, the collection of all data associated with
    a single instruction that is in the stream.  */
-struct _sel_insn_data
+class _sel_insn_data
 {
+public:
   /* The expression that contains vinsn for this insn and some
      flow-sensitive data like priority.  */
   expr_def expr;
index d278f0a2900fd172fa582cbe0cf9ee77d8a91421..6152ef5478257f27b51a783d0a6173576ae13de0 100644 (file)
@@ -30,8 +30,9 @@ namespace selftest {
 /* A struct describing the source-location of a selftest, to make it
    easier to track down failing tests.  */
 
-struct location
+class location
 {
+public:
   location (const char *file, int line, const char *function)
     : m_file (file), m_line (line), m_function (function) {}
 
index 8931b28b29f82f776c78da02c7997f6a4ea2e583..0319da6508f3fdc7b43866a942617b0b9242e039 100644 (file)
@@ -26,8 +26,9 @@ typedef struct ifsese_s *ifsese;
 
 /* A Single Entry, Single Exit region is a part of the CFG delimited
    by two edges.  */
-struct sese_l
+class sese_l
 {
+public:
   sese_l (edge e, edge x) : entry (e), exit (x) {}
 
   operator bool () const { return entry && exit; }
@@ -71,8 +72,9 @@ vec_find (const vec<T> &v, const T &elem)
 }
 
 /* A helper structure for bookkeeping information about a scop in graphite.  */
-typedef struct sese_info_t
+typedef class sese_info_t
 {
+public:
   /* The SESE region.  */
   sese_l region;
 
index 8ed3bf5aa2f0fe39c16c1b503090997977fe0788..040899e273116041cd988df8c947296a4d3f6737 100644 (file)
@@ -68,8 +68,9 @@ along with GCC; see the file COPYING3.  If not see
 
 */
 
-struct simple_case_node
+class simple_case_node
 {
+public:
   simple_case_node (tree low, tree high, tree code_label):
     m_low (low), m_high (high), m_code_label (code_label)
   {}
index 5af846c9f54af0bb90dc3b22111bbf1856843b21..57cb42f320ed04f52267c7b7a1b5ea702d69f3a7 100644 (file)
@@ -39,7 +39,8 @@ extern struct target_bb_reorder *this_target_bb_reorder;
 extern struct target_lower_subreg *this_target_lower_subreg;
 #endif
 
-struct GTY(()) target_globals {
+class GTY(()) target_globals {
+public:
   ~target_globals ();
 
   struct target_flag_state *GTY((skip)) flag_state;
index b8a62a6aff12f946d0aba8d5ae427dd78600571d..ee7e010a1a5b74d629634e4b3bd25efe6ba36304 100644 (file)
@@ -695,8 +695,9 @@ aff_combination_find_elt (aff_tree *comb, tree val, unsigned *idx)
 /* Element of the cache that maps ssa name NAME to its expanded form
    as an affine expression EXPANSION.  */
 
-struct name_expansion
+class name_expansion
 {
+public:
   aff_tree expansion;
 
   /* True if the expansion for the name is just being generated.  */
index 257e8f69d03a8e27420e8fc8618045b6ff1e050d..23c6096254b939eda822b813c252183fae051906 100644 (file)
@@ -28,8 +28,9 @@ along with GCC; see the file COPYING3.  If not see
 
 /* Element of an affine combination.  */
 
-struct aff_comb_elt
+class aff_comb_elt
 {
+public:
   /* The value of the element.  */
   tree val;
 
@@ -37,8 +38,9 @@ struct aff_comb_elt
   widest_int coef;
 };
 
-struct aff_tree
+class aff_tree
 {
+public:
   /* Type of the result of the combination.  */
   tree type;
 
index 69d5a82c56464678330fd1a36d9692185b65b38f..d7cd98d589ddc498f9fa12118582a6f82bf9697d 100644 (file)
@@ -203,8 +203,9 @@ typedef struct data_reference *data_reference_p;
    including the data ref itself and the segment length for aliasing
    checks.  This is used to merge alias checks.  */
 
-struct dr_with_seg_len
+class dr_with_seg_len
 {
+public:
   dr_with_seg_len (data_reference_p d, tree len, unsigned HOST_WIDE_INT size,
                   unsigned int a)
     : dr (d), seg_len (len), access_size (size), align (a) {}
@@ -224,8 +225,9 @@ struct dr_with_seg_len
 /* This struct contains two dr_with_seg_len objects with aliasing data
    refs.  Two comparisons are generated from them.  */
 
-struct dr_with_seg_len_pair_t
+class dr_with_seg_len_pair_t
 {
+public:
   dr_with_seg_len_pair_t (const dr_with_seg_len& d1,
                               const dr_with_seg_len& d2)
     : first (d1), second (d2) {}
index d8c8249e8ac9116ede2842e40724bfd1840d0a13..eb35ebf8d996868636271e477eccd26fd91ee85c 100644 (file)
@@ -129,8 +129,9 @@ ssa_is_replaceable_p (gimple *stmt)
    rarely more than 6, and in the bootstrap of gcc, the maximum number
    of nodes encountered was 12.  */
 
-struct elim_graph
+class elim_graph
 {
+public:
   elim_graph (var_map map);
 
   /* Size of the elimination vectors.  */
index 8e83a715a24da4aaa47108c4cc1b0186fc5fd9b8..dfb21460d58fc3667a8dd71c90957ab526f39968 100644 (file)
@@ -243,8 +243,9 @@ along with GCC; see the file COPYING3.  If not see
 /* Data references (or phi nodes that carry data reference values across
    loop iterations).  */
 
-typedef struct dref_d
+typedef class dref_d
 {
+public:
   /* The reference itself.  */
   struct data_reference *ref;
 
index b1c15dc11baa560b2dd89330a5eb5f65a4b56e6a..08c882edd6f40b2857c6f3960f194a49cd84d4d3 100644 (file)
@@ -370,8 +370,9 @@ find_var_scev_info (basic_block instantiated_below, tree var)
    analyzing a scalar evolution, instantiating a CHREC or
    resolving mixers.  */
 
-struct instantiate_cache_type
+class instantiate_cache_type
 {
+public:
   htab_t map;
   vec<scev_info_str> entries;
 
index ddd28ec3c75b50c56ed76d38a0ffaad85d611a68..c7c6020efc03aee6ae51e6a2584e7ff7c19be289 100644 (file)
@@ -68,8 +68,9 @@ struct GTY(()) pt_solution
 /* Simplified and cached information about a memory reference tree.
    Used by the alias-oracle internally and externally in alternate
    interfaces.  */
-struct ao_ref
+class ao_ref
 {
+public:
   /* The original full memory reference tree or NULL_TREE if that is
      not available.  */
   tree ref;
index 51b9d9f53d23d812ebd9f6fef031b981f00d7187..4dd703558b1ba00216c12a68b5dccfdc880c73e0 100644 (file)
@@ -157,7 +157,8 @@ typedef enum
   VARYING
 } ccp_lattice_t;
 
-struct ccp_prop_value_t {
+class ccp_prop_value_t {
+public:
     /* Lattice value.  */
     ccp_lattice_t lattice_val;
 
index 2ea0a66ac272665727ba4fd90439bec42aca9edf..2ca0d02d9a000c694a4317db88c8bb55e3a48ba8 100644 (file)
@@ -674,8 +674,9 @@ ssa_conflicts_dump (FILE *file, ssa_conflicts *ptr)
    marked as being live.  This delays clearing of these bitmaps until
    they are actually needed again.  */
 
-struct live_track
+class live_track
 {
+public:
   bitmap_obstack obstack;      /* A place to allocate our bitmaps.  */
   bitmap_head live_base_var;           /* Indicates if a basevar is live.  */
   bitmap_head *live_base_partitions;   /* Live partitions for each basevar.  */
index 2064c2900fb79d7bc077f1fb837fa84562c9008c..f8bcabc0aa5d72c067c25f43ecf876d29d355614 100644 (file)
@@ -113,8 +113,9 @@ struct mem_ref_loc
 
 /* Description of a memory reference.  */
 
-struct im_mem_ref
+class im_mem_ref
 {
+public:
   unsigned id : 30;            /* ID assigned to the memory reference
                                   (its index in memory_accesses.refs_list)  */
   unsigned ref_canonical : 1;   /* Whether mem.ref was canonicalized.  */
@@ -1756,8 +1757,9 @@ for_all_locs_in_loop (struct loop *loop, im_mem_ref *ref, FN fn)
 
 /* Rewrites location LOC by TMP_VAR.  */
 
-struct rewrite_mem_ref_loc
+class rewrite_mem_ref_loc
 {
+public:
   rewrite_mem_ref_loc (tree tmp_var_) : tmp_var (tmp_var_) {}
   bool operator () (mem_ref_loc *loc);
   tree tmp_var;
@@ -1781,8 +1783,9 @@ rewrite_mem_refs (struct loop *loop, im_mem_ref *ref, tree tmp_var)
 
 /* Stores the first reference location in LOCP.  */
 
-struct first_mem_ref_loc_1
+class first_mem_ref_loc_1
 {
+public:
   first_mem_ref_loc_1 (mem_ref_loc **locp_) : locp (locp_) {}
   bool operator () (mem_ref_loc *loc);
   mem_ref_loc **locp;
@@ -2017,8 +2020,9 @@ execute_sm_if_changed (edge ex, tree mem, tree tmp_var, tree flag,
 
 /* When REF is set on the location, set flag indicating the store.  */
 
-struct sm_set_flag_if_changed
+class sm_set_flag_if_changed
 {
+public:
   sm_set_flag_if_changed (tree flag_, hash_set <basic_block> *bbs_)
         : flag (flag_), bbs (bbs_) {}
   bool operator () (mem_ref_loc *loc);
@@ -2151,8 +2155,9 @@ hoist_memory_references (struct loop *loop, bitmap mem_refs,
     }
 }
 
-struct ref_always_accessed
+class ref_always_accessed
 {
+public:
   ref_always_accessed (struct loop *loop_, bool stored_p_)
       : loop (loop_), stored_p (stored_p_) {}
   bool operator () (mem_ref_loc *loc);
index bbae83cbc6eaa432212a4c71463a449ee9a30b33..cb189aba53361e030f09a0717b404cc5fb8430a1 100644 (file)
@@ -175,8 +175,9 @@ enum use_type
 };
 
 /* Cost of a computation.  */
-struct comp_cost
+class comp_cost
 {
+public:
   comp_cost (): cost (0), complexity (0), scratch (0)
   {}
 
@@ -352,8 +353,9 @@ operator<= (comp_cost cost1, comp_cost cost2)
 struct iv_inv_expr_ent;
 
 /* The candidate - cost pair.  */
-struct cost_pair
+class cost_pair
 {
+public:
   struct iv_cand *cand;        /* The candidate.  */
   comp_cost cost;      /* The cost.  */
   enum tree_code comp; /* For iv elimination, the comparison.  */
@@ -442,8 +444,9 @@ struct iv_cand
 };
 
 /* Hashtable entry for common candidate derived from iv uses.  */
-struct iv_common_cand
+class iv_common_cand
 {
+public:
   tree base;
   tree step;
   /* IV uses from which this common candidate is derived.  */
@@ -616,8 +619,9 @@ struct ivopts_data
 
 /* An assignment of iv candidates to uses.  */
 
-struct iv_ca
+class iv_ca
 {
+public:
   /* The number of uses covered by the assignment.  */
   unsigned upto;
 
index 2fc9e8c8051cd4a3e70e650caaf781f133bf4982..24fad0f3e10a9e40882f35269c58e29599cb1395 100644 (file)
@@ -36,8 +36,9 @@ struct affine_iv
    the structure can be evaluated at the end of the loop's preheader
    (and due to ssa form, also anywhere inside the body of the loop).  */
 
-struct tree_niter_desc
+class tree_niter_desc
 {
+public:
   tree assumptions;    /* The boolean expression.  If this expression evaluates
                           to false, then the other fields in this structure
                           should not be used; there is no guarantee that they
index 231ac00c1d1c11b5185f092895dd037008afc6b2..36da4c6a1e1de3e02e62cc809e09c7645ba8f0f8 100644 (file)
@@ -428,8 +428,9 @@ get_or_alloc_expr_for_name (tree name)
 
 /* An unordered bitmap set.  One bitmap tracks values, the other,
    expressions.  */
-typedef struct bitmap_set
+typedef class bitmap_set
 {
+public:
   bitmap_head expressions;
   bitmap_head values;
 } *bitmap_set_t;
index 29688d2618d41efe54d3c8c2720b730dde22e377..f470f31d29502b41c5d0bdd69e6d0358790815fb 100644 (file)
@@ -1393,8 +1393,9 @@ static bitmap changed;
 
 /* Strongly Connected Component visitation info.  */
 
-struct scc_info
+class scc_info
 {
+public:
   scc_info (size_t size);
   ~scc_info ();
 
index a9a959c39dba5af1fd9a768164b3fc40aacc438a..653007f0e17b5beb7e80a4d530af0b0c45b5191a 100644 (file)
@@ -44,8 +44,9 @@ enum cluster_type
      |-jump_table_cluster (JUMP_TABLE)
      `-bit_test_cluster   (BIT_TEST).  */
 
-struct cluster
+class cluster
 {
+public:
   /* Constructor.  */
   cluster (tree case_label_expr, basic_block case_bb, profile_probability prob,
           profile_probability subtree_prob);
@@ -117,8 +118,9 @@ cluster::cluster (tree case_label_expr, basic_block case_bb,
 /* Subclass of cluster representing a simple contiguous range
    from [low..high].  */
 
-struct simple_cluster: public cluster
+class simple_cluster: public cluster
 {
+public:
   /* Constructor.  */
   simple_cluster (tree low, tree high, tree case_label_expr,
                  basic_block case_bb, profile_probability prob);
@@ -196,8 +198,9 @@ simple_cluster::simple_cluster (tree low, tree high, tree case_label_expr,
 /* Abstract subclass of jump table and bit test cluster,
    handling a collection of simple_cluster instances.  */
 
-struct group_cluster: public cluster
+class group_cluster: public cluster
 {
+public:
   /* Constructor.  */
   group_cluster (vec<cluster *> &clusters, unsigned start, unsigned end);
 
@@ -233,8 +236,9 @@ struct group_cluster: public cluster
    The "emit" vfunc gernerates a nested switch statement which
    is later lowered to a jump table.  */
 
-struct jump_table_cluster: public group_cluster
+class jump_table_cluster: public group_cluster
 {
+public:
   /* Constructor.  */
   jump_table_cluster (vec<cluster *> &clusters, unsigned start, unsigned end)
   : group_cluster (clusters, start, end)
@@ -332,8 +336,9 @@ This transformation was contributed by Roger Sayle, see this e-mail:
    http://gcc.gnu.org/ml/gcc-patches/2003-01/msg01950.html
 */
 
-struct bit_test_cluster: public group_cluster
+class bit_test_cluster: public group_cluster
 {
+public:
   /* Constructor.  */
   bit_test_cluster (vec<cluster *> &clusters, unsigned start, unsigned end,
                    bool handles_entire_switch)
@@ -417,8 +422,9 @@ struct bit_test_cluster: public group_cluster
 
 /* Helper struct to find minimal clusters.  */
 
-struct min_cluster_item
+class min_cluster_item
 {
+public:
   /* Constructor.  */
   min_cluster_item (unsigned count, unsigned start, unsigned non_jt_cases):
     m_count (count), m_start (start), m_non_jt_cases (non_jt_cases)
@@ -436,8 +442,9 @@ struct min_cluster_item
 
 /* Helper struct to represent switch decision tree.  */
 
-struct case_tree_node
+class case_tree_node
 {
+public:
   /* Empty Constructor.  */
   case_tree_node ();
 
@@ -503,8 +510,9 @@ bool jump_table_cluster::is_enabled (void)
    is used to quickly identify all cases in this set without
    looking at label_to_block for every case label.  */
 
-struct case_bit_test
+class case_bit_test
 {
+public:
   wide_int mask;
   basic_block target_bb;
   tree label;
@@ -515,8 +523,9 @@ struct case_bit_test
   static int cmp (const void *p1, const void *p2);
 };
 
-struct switch_decision_tree
+class switch_decision_tree
 {
+public:
   /* Constructor.  */
   switch_decision_tree (gswitch *swtch): m_switch (swtch), m_phi_mapping (),
     m_case_bbs (), m_case_node_pool ("struct case_node pool"),
@@ -681,8 +690,9 @@ This transformation was contributed by Martin Jambor, see this e-mail:
    http://gcc.gnu.org/ml/gcc-patches/2008-07/msg00011.html  */
 
 /* The main structure of the pass.  */
-struct switch_conversion
+class switch_conversion
 {
+public:
   /* Constructor.  */
   switch_conversion ();
 
index ff952d6f464fd86c49e9fa8268910ba88d91d15a..0157ba4992e39904b9d36327d565aab9ab08c57a 100644 (file)
@@ -286,7 +286,8 @@ type_conversion_p (tree name, stmt_vec_info stmt_vinfo, bool check_sign,
 
 /* Holds information about an input operand after some sign changes
    and type promotions have been peeled away.  */
-struct vect_unpromoted_value {
+class vect_unpromoted_value {
+public:
   vect_unpromoted_value ();
 
   void set_op (tree, vect_def_type, stmt_vec_info = NULL);
index 325ef58722d21a65ab896a9358677b07111b060b..868dc5c675c081342cbf854b99fa3a4e78588c37 100644 (file)
@@ -188,8 +188,9 @@ dump_stmt_cost (FILE *f, void *data, int count, enum vect_cost_for_stmt kind,
 \f
 /* For mapping simduid to vectorization factor.  */
 
-struct simduid_to_vf : free_ptr_hash<simduid_to_vf>
+class simduid_to_vf : public free_ptr_hash<simduid_to_vf>
 {
+public:
   unsigned int simduid;
   poly_uint64 vf;
 
index f7432f0584762fd28d54f2978dc59f2df443e991..6e76b7eaab5cd772464757e89089732201eb0367 100644 (file)
@@ -141,7 +141,8 @@ struct _slp_tree {
 
 /* SLP instance is a sequence of stmts in a loop that can be packed into
    SIMD stmts.  */
-typedef struct _slp_instance {
+typedef class _slp_instance {
+public:
   /* The root of SLP tree.  */
   slp_tree root;
 
@@ -181,7 +182,8 @@ typedef std::pair<tree, tree> vec_object_pair;
 
 /* Records that vectorization is only possible if abs (EXPR) >= MIN_VALUE.
    UNSIGNED_P is true if we can assume that abs (EXPR) == EXPR.  */
-struct vec_lower_bound {
+class vec_lower_bound {
+public:
   vec_lower_bound () {}
   vec_lower_bound (tree e, bool u, poly_uint64 m)
     : expr (e), unsigned_p (u), min_value (m) {}
@@ -193,7 +195,8 @@ struct vec_lower_bound {
 
 /* Vectorizer state shared between different analyses like vector sizes
    of the same CFG region.  */
-struct vec_info_shared {
+class vec_info_shared {
+public:
   vec_info_shared();
   ~vec_info_shared();
 
@@ -213,7 +216,8 @@ struct vec_info_shared {
 };
 
 /* Vectorizer state common between loop and basic-block vectorization.  */
-struct vec_info {
+class vec_info {
+public:
   enum vec_kind { bb, loop };
 
   vec_info (vec_kind, void *, vec_info_shared *);
@@ -377,7 +381,8 @@ typedef auto_vec<rgroup_masks> vec_loop_masks;
 /*-----------------------------------------------------------------*/
 /* Info on vectorized loops.                                       */
 /*-----------------------------------------------------------------*/
-typedef struct _loop_vec_info : public vec_info {
+typedef class _loop_vec_info : public vec_info {
+public:
   _loop_vec_info (struct loop *, vec_info_shared *);
   ~_loop_vec_info ();
 
@@ -650,8 +655,9 @@ loop_vec_info_for_loop (struct loop *loop)
   return (loop_vec_info) loop->aux;
 }
 
-typedef struct _bb_vec_info : public vec_info
+typedef class _bb_vec_info : public vec_info
 {
+public:
   _bb_vec_info (gimple_stmt_iterator, gimple_stmt_iterator, vec_info_shared *);
   ~_bb_vec_info ();
 
@@ -790,7 +796,8 @@ enum vect_memory_access_type {
   VMAT_GATHER_SCATTER
 };
 
-struct dr_vec_info {
+class dr_vec_info {
+public:
   /* The data reference itself.  */
   data_reference *dr;
   /* The statement that contains the data reference.  */
@@ -807,7 +814,8 @@ struct dr_vec_info {
 
 typedef struct data_reference *dr_p;
 
-struct _stmt_vec_info {
+class _stmt_vec_info {
+public:
 
   enum stmt_vec_info_type type;
 
index 563af6fbdda66d92be47bc9a8efa3b5e0cb8e7c1..7892c20e5c44ada8ca80c7fb4ebee2e69e5e6622 100644 (file)
@@ -5107,8 +5107,9 @@ protected_set_expr_location (tree t, location_t loc)
 
 /* Data used when collecting DECLs and TYPEs for language data removal.  */
 
-struct free_lang_data_d
+class free_lang_data_d
 {
+public:
   free_lang_data_d () : decls (100), types (100) {}
 
   /* Worklist to avoid excessive recursion.  */
index 3dce602dfbaca03f568e1c3638d56dfe3a3fd01c..992abd12f7a74e27cec8f88395956e41cd875249 100644 (file)
@@ -5984,8 +5984,9 @@ desired_pro_or_demotion_p (const_tree to_type, const_tree from_type)
 
 /* Pointer type used to declare builtins before we have seen its real
    declaration.  */
-struct builtin_structptr_type
+class builtin_structptr_type
 {
+public:
   tree& node;
   tree& base;
   const char *str;
@@ -6069,8 +6070,9 @@ fndecl_built_in_p (const_tree node, built_in_function name)
 
    where it is not.  */
 
-struct op_location_t
+class op_location_t
 {
+public:
   location_t m_operator_loc;
   location_t m_combined_loc;
 
index 9e0f2a9bb6c488fff4455ecebff916b7d5b55413..45c189b2e97c7ba77dbddcc3bece7235ccb3427c 100644 (file)
@@ -31,8 +31,9 @@ namespace {
 
 /* A class for counting ctor and dtor invocations.  */
 
-struct stats
+class stats
 {
+public:
   stats () : ctor_count (0), dtor_count (0) {}
 
   int ctor_count;
@@ -59,8 +60,9 @@ private:
 
 /* A struct for testing unique_ptr<T[]>.  */
 
-struct has_default_ctor
+class has_default_ctor
 {
+public:
   has_default_ctor () : m_field (42) {}
   int m_field;
 };
index c2b4204c0cb7c0c8b49aaf622318acab7f584c04..65df25dfb52d58fd03b3f955cb8de155cdba6cc0 100644 (file)
@@ -929,8 +929,9 @@ static poly_int64 hard_frame_pointer_adjustment = -1;
 
 /* Data for adjust_mems callback.  */
 
-struct adjust_mem_data
+class adjust_mem_data
 {
+public:
   bool store;
   machine_mode mem_mode;
   HOST_WIDE_INT stack_adjust;
@@ -8061,8 +8062,9 @@ delete_variable_part (dataflow_set *set, rtx loc, decl_or_value dv,
 
 /* Structure for passing some other parameters to function
    vt_expand_loc_callback.  */
-struct expand_loc_callback_data
+class expand_loc_callback_data
 {
+public:
   /* The variables and values active at this point.  */
   variable_table_type *vars;
 
index 626a4c9f9a0dfcfc10b6831ed3e9384fe50f5d53..827a37092fd9b99f1742da86882bb2786ce6b3ec 100644 (file)
@@ -2899,7 +2899,8 @@ assemble_real (REAL_VALUE_TYPE d, scalar_float_mode mode, unsigned int align,
    Store them both in the structure *VALUE.
    EXP must be reducible.  */
 
-struct addr_const {
+class addr_const {
+public:
   rtx base;
   poly_int64 offset;
 };
@@ -3621,7 +3622,8 @@ tree_output_constant_def (tree exp)
   return decl;
 }
 \f
-struct GTY((chain_next ("%h.next"), for_user)) constant_descriptor_rtx {
+class GTY((chain_next ("%h.next"), for_user)) constant_descriptor_rtx {
+public:
   struct constant_descriptor_rtx *next;
   rtx mem;
   rtx sym;
index f4749229ca2a973672e0a2b3f0a6a56a14e578c1..cbd2db010f973fedee3b523912bdd66d24f7cb5c 100644 (file)
--- a/gcc/vec.c
+++ b/gcc/vec.c
@@ -49,8 +49,9 @@ along with GCC; see the file COPYING3.  If not see
 vnull vNULL;
 
 /* Vector memory usage.  */
-struct vec_usage: public mem_usage
+class vec_usage: public mem_usage
 {
+public:
   /* Default constructor.  */
   vec_usage (): m_items (0), m_items_peak (0), m_element_size (0) {}
 
index 529756f299d0443637408fbc5e8f5faf85306de9..e95e46349ada28071610b8f73eb6c221f0c044ed 100644 (file)
@@ -20,8 +20,9 @@ along with GCC; see the file COPYING3.  If not see
 #ifndef GCC_WIDE_INT_BITMASK_H
 #define GCC_WIDE_INT_BITMASK_H
 
-struct wide_int_bitmask
+class wide_int_bitmask
 {
+public:
   inline wide_int_bitmask ();
   inline wide_int_bitmask (uint64_t l);
   inline wide_int_bitmask (uint64_t l, uint64_t h);
index 25ea05454392057fab646dd0e0e5271155179da9..18e76b7ab1fc582e62f32619f5b1dcea838f6ae9 100644 (file)
@@ -642,8 +642,9 @@ namespace wi
 {
   /* Contains the components of a decomposed integer for easy, direct
      access.  */
-  struct storage_ref
+  class storage_ref
   {
+  public:
     storage_ref () {}
     storage_ref (const HOST_WIDE_INT *, unsigned int, unsigned int);
 
@@ -968,7 +969,7 @@ decompose (HOST_WIDE_INT *, unsigned int precision,
    wide_int, with the optimization that VAL is normally a pointer to
    another integer's storage, so that no array copy is needed.  */
 template <bool SE, bool HDP>
-struct wide_int_ref_storage : public wi::storage_ref
+class wide_int_ref_storage : public wi::storage_ref
 {
 private:
   /* Scratch space that can be used when decomposing the original integer.
@@ -1357,7 +1358,7 @@ namespace wi
    bytes beyond the sizeof need to be allocated.  Use set_precision
    to initialize the structure.  */
 template <int N>
-class GTY((user)) trailing_wide_ints
+struct GTY((user)) trailing_wide_ints
 {
 private:
   /* The shared precision of each number.  */
@@ -1554,8 +1555,9 @@ namespace wi
 {
   /* Stores HWI-sized integer VAL, treating it as having signedness SGN
      and precision PRECISION.  */
-  struct hwi_with_prec
+  class hwi_with_prec
   {
+  public:
     hwi_with_prec () {}
     hwi_with_prec (HOST_WIDE_INT, unsigned int, signop);
     HOST_WIDE_INT val;
index ff5f0aa8e06ca3656be5814232ca0c38e44c2f73..c6e8e04b46e011e31edcc868e04bebf8630eaa49 100644 (file)
@@ -1,3 +1,9 @@
+2019-07-09  Martin Sebor  <msebor@redhat.com>
+
+       * include/line-map.h: Change class-key from class to struct and vice
+       versa to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
+       * mkdeps.c: Same.
+
 2019-07-03  Martin Liska  <mliska@suse.cz>
 
        * line-map.c (linemap_get_expansion_filename): Remove
index 7649700e8a5131a32366a6d1662773e6822e64f2..3961b636e238d982e7019f9f715c3ac3e11ecd2c 100644 (file)
@@ -770,7 +770,8 @@ struct GTY(()) location_adhoc_data_map {
 };
 
 /* A set of chronological line_map structures.  */
-struct GTY(()) line_maps {
+class GTY(()) line_maps {
+public:
 
   ~line_maps ();
   
@@ -1783,8 +1784,9 @@ protected:
    of localized text, and a flag to determine if the caller should "free" the
    buffer.  */
 
-struct label_text
+class label_text
 {
+public:
   label_text ()
   : m_buffer (NULL), m_caller_owned (false)
   {}
index 50f0fb2a80dc12847e400e07bed40c81430e399d..6693c21db526ecbb2f12a333feae8aa4fc93a801 100644 (file)
@@ -29,7 +29,7 @@ along with this program; see the file COPYING3.  If not see
 
 /* Keep this structure local to this file, so clients don't find it
    easy to start making assumptions.  */
-struct mkdeps
+class mkdeps
 {
 public:
   /* T has trivial cctor & dtor.  */