aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/common/gdb_optional.h5
2 files changed, 8 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 7fcfebb..93d20b5 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2017-04-05 Pedro Alves <palves@redhat.com>
+
+ * common/gdb_optional.h (optional::optional): Make constexpr and
+ initialize m_dummy.
+
2017-04-04 John Baldwin <jhb@FreeBSD.org>
* amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
diff --git a/gdb/common/gdb_optional.h b/gdb/common/gdb_optional.h
index fef7a73..ad1119f 100644
--- a/gdb/common/gdb_optional.h
+++ b/gdb/common/gdb_optional.h
@@ -34,8 +34,9 @@ class optional
{
public:
- optional ()
- : m_instantiated (false)
+ constexpr optional ()
+ : m_dummy (),
+ m_instantiated (false)
{
}