On 04/21/2017 10:02 AM, marxin wrote:
gcc/ChangeLog:

2017-04-26  Martin Liska  <mli...@suse.cz>

        * gcov.c (struct block_location_info): New struct.
        (process_file): Fill up the new structure.
        (read_graph_file): Replace usage of encoding by the newly added
        struct.
        (add_line_counts): Likewise.
        (accumulate_line_counts): Remove usage of the union.
        (function_info::function_info): New function.
        (function_info::~function_info): Likewise.
        (process_file): Call delete instead of release_function.
        (release_function): Release the function.
        (release_structures): Call delete instead of release_function.
        (solve_flow_graph): Replace usage of num_blocks.
        (find_exception_blocks): Likewise.
        (output_lines): Fix GNU coding style.

diff --git a/gcc/gcov.c b/gcc/gcov.c
index 63f6a75f1af..7400cdee110 100644
--- a/gcc/gcov.c
+++ b/gcc/gcov.c
@@ -114,6 +114,16 @@ typedef struct arc_info
    struct arc_info *pred_next;
  } arc_t;
+struct block_location_info

/* needs comment.  */



@@ -427,9 +429,31 @@ static void output_lines (FILE *, const source_t *);
  static char *make_gcov_file_name (const char *, const char *);
  static char *mangle_name (const char *, char *);
  static void release_structures (void);
-static void release_function (function_t *);
  extern int main (int, char **);
+function_info::function_info ()
+{
+  memset (this, 0, sizeof (*this));

EW.  ok with a comment about function_info's c++11's PoDness.

ok with those fixed.

nathan
--
Nathan Sidwell

Reply via email to