This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA v3 21/23] Introduce gdb_argv, a class wrapper for buildargv


Tom Tromey <tom@tromey.com> writes:

> +  bool operator!= (nullptr_t)
> +  {
> +    return m_argv != NULL;
> +  }
> +
> +  bool operator== (nullptr_t)
> +  {
> +    return m_argv == NULL;
> +  }

nullptr_t breaks the build for mingw target, and I pushed the following
patch to fix it.

-- 
Yao (齐尧)
From 91975afd35bb0c6c0fc5ce0794ec0ae8ebe2f805 Mon Sep 17 00:00:00 2001
From: Yao Qi <yao.qi@linaro.org>
Date: Fri, 4 Aug 2017 14:27:58 +0100
Subject: [PATCH] Add namespace std to nullptr_t
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This patch fixes the build failure for target i686-w64-mingw32,

In file included from ../../binutils-gdb/gdb/defs.h:786:0,
                 from ../../binutils-gdb/gdb/gdb.c:19:
../../binutils-gdb/gdb/utils.h:188:20: error: ‘nullptr_t’ has not been declared
   bool operator!= (nullptr_t)
                    ^
../../binutils-gdb/gdb/utils.h:193:20: error: ‘nullptr_t’ has not been declared
   bool operator== (nullptr_t)
                    ^

gdb:

2017-08-04  Yao Qi  <yao.qi@linaro.org>

	* utils.h (gdb_argv): Add namespace std for nullptr_t.

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 7f16f86..d286f51 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2017-08-04  Yao Qi  <yao.qi@linaro.org>
+
+	* utils.h (gdb_argv): Add namespace std for nullptr_t.
+
 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
 
 	* MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
diff --git a/gdb/utils.h b/gdb/utils.h
index c922a22..bb5fadc 100644
--- a/gdb/utils.h
+++ b/gdb/utils.h
@@ -185,12 +185,12 @@ public:
     return m_argv + count ();
   }
 
-  bool operator!= (nullptr_t)
+  bool operator!= (std::nullptr_t)
   {
     return m_argv != NULL;
   }
 
-  bool operator== (nullptr_t)
+  bool operator== (std::nullptr_t)
   {
     return m_argv == NULL;
   }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]