From 9af7cc783aebb975a487747e530030b47beeca09 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Wed, 5 Dec 2018 12:19:34 +1030 Subject: [PATCH] gold won't build with gcc-9 * symtab.h (Symbol::Symbol): Avoid -Wclass-memaccess warning. --- gold/ChangeLog | 4 ++++ gold/symtab.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gold/ChangeLog b/gold/ChangeLog index f0d3ef92435..2379536e702 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,7 @@ +2018-12-05 Alan Modra + + * symtab.h (Symbol::Symbol): Avoid -Wclass-memaccess warning. + 2018-12-03 Alexey Neyman PR gold/23594 diff --git a/gold/symtab.h b/gold/symtab.h index 089e156b452..16a244855da 100644 --- a/gold/symtab.h +++ b/gold/symtab.h @@ -914,7 +914,7 @@ class Symbol // Instances of this class should always be created at a specific // size. Symbol() - { memset(this, 0, sizeof *this); } + { memset(static_cast(this), 0, sizeof *this); } // Initialize the general fields. void -- 2.30.2