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

login
register
mail settings
Submitter Yao Qi
Date Aug. 4, 2017, 1:32 p.m.
Message ID <86vam31ms3.fsf@gmail.com>
Download mbox | patch
Permalink /patch/21918/
State New
Headers show

Comments

Yao Qi - Aug. 4, 2017, 1:32 p.m.
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.

Patch

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;
   }