From 3404c48b0ae0cd09025a54c20df86b8cc3567f70 Mon Sep 17 00:00:00 2001 From: jason Date: Tue, 15 Dec 2015 16:21:50 +0000 Subject: [PATCH] * hash-map.h, hash-table.h: Make copy constructors explicit. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@231658 138bc75d-0d04-0410-961f-82ee72b054a4 --- 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 02c2117836db..c25b4ecc5c08 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 510353bf4f78..f61b7ab7aff6 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 53e72e66f335..5725372dde2b 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.47.2