[binutils-gdb] gold won't build with gcc-9
Alan Modra
amodra@sourceware.org
Wed Dec 5 04:03:00 GMT 2018
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=9af7cc783aebb975a487747e530030b47beeca09
commit 9af7cc783aebb975a487747e530030b47beeca09
Author: Alan Modra <amodra@gmail.com>
Date: Wed Dec 5 12:19:34 2018 +1030
gold won't build with gcc-9
* symtab.h (Symbol::Symbol): Avoid -Wclass-memaccess warning.
Diff:
---
gold/ChangeLog | 4 ++++
gold/symtab.h | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/gold/ChangeLog b/gold/ChangeLog
index f0d3ef9..2379536 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,3 +1,7 @@
+2018-12-05 Alan Modra <amodra@gmail.com>
+
+ * symtab.h (Symbol::Symbol): Avoid -Wclass-memaccess warning.
+
2018-12-03 Alexey Neyman <stilor@att.net>
PR gold/23594
diff --git a/gold/symtab.h b/gold/symtab.h
index 089e156..16a2448 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<void*>(this), 0, sizeof *this); }
// Initialize the general fields.
void
More information about the Binutils-cvs
mailing list