From 951c9e90e3c73a73dde3bbeb43a7bf882803b254 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Tue, 15 Dec 2015 11:21:50 -0500 Subject: [PATCH] * hash-map.h, hash-table.h: Make copy constructors explicit. From-SVN: r231658 --- gcc/ChangeLog | 4 ++++ gcc/hash-map.h | 5 +++-- gcc/hash-table.h | 8 ++++---- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 02c2117836d..c25b4ecc5c0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2015-12-15 Jason Merrill + + * hash-map.h, hash-table.h: Make copy constructors explicit. + 2015-12-15 Ilya Verbin * cgraphunit.c (output_in_order): Do not assemble "omp declare target diff --git a/gcc/hash-map.h b/gcc/hash-map.h index 510353bf4f7..f61b7ab7aff 100644 --- a/gcc/hash-map.h +++ b/gcc/hash-map.h @@ -111,8 +111,9 @@ public: CXX_MEM_STAT_INFO) : m_table (n, ggc, gather_mem_stats, HASH_MAP_ORIGIN PASS_MEM_STAT) {} - hash_map (const hash_map &h, bool ggc = false, - bool gather_mem_stats = GATHER_STATISTICS CXX_MEM_STAT_INFO) + explicit hash_map (const hash_map &h, bool ggc = false, + bool gather_mem_stats = GATHER_STATISTICS + CXX_MEM_STAT_INFO) : m_table (h.m_table, ggc, gather_mem_stats, HASH_MAP_ORIGIN PASS_MEM_STAT) {} diff --git a/gcc/hash-table.h b/gcc/hash-table.h index 53e72e66f33..5725372dde2 100644 --- a/gcc/hash-table.h +++ b/gcc/hash-table.h @@ -365,10 +365,10 @@ public: bool gather_mem_stats = GATHER_STATISTICS, mem_alloc_origin origin = HASH_TABLE_ORIGIN CXX_MEM_STAT_INFO); - hash_table (const hash_table &, bool ggc = false, - bool gather_mem_stats = GATHER_STATISTICS, - mem_alloc_origin origin = HASH_TABLE_ORIGIN - CXX_MEM_STAT_INFO); + explicit hash_table (const hash_table &, bool ggc = false, + bool gather_mem_stats = GATHER_STATISTICS, + mem_alloc_origin origin = HASH_TABLE_ORIGIN + CXX_MEM_STAT_INFO); ~hash_table (); /* Create a hash_table in gc memory. */ -- 2.30.2