title: Strange behaviour of gdb
body: <p>I am debugging following sample code in gdb </p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string.h&gt;
  
  using namespace std;
  
  void c (char** q)
  {
      q = new char*[2];
      if (q == NULL)
          cout&lt;&lt;"NO OK";
      else
          cout&lt;&lt;"OK";
  }
  
  int main ()
  {
      char** d = NULL;
      c(d);
      return 1;
  }
  </code></pre>
  
  <p>Now this program gives output as "OK"
  but while debugging this code in gdb i found following behavior
  gdb -version
  GNU gdb (GDB) 7.5.1</p>
  
  <pre><code>Breakpoint 1, c (q=0x0) at issue.cpp:8
  warning: Source file is more recent than executable.
  8           q = new char*[2];
  (gdb) p q
  $1 = (char **) 0x0
  (gdb) n
  9           if (q == NULL)
  (gdb) p q
  $2 = (char **) 0x0
  (gdb) p q==0
  $3 = true
  (gdb) n
  12              cout&lt;&lt;"OK";
  (gdb) p q
  $4 = (char **) 0x0
  (gdb) p q==0
  $5 = true
  (gdb)     
  </code></pre>
  
  <p>gdb is showing q value a null but code is executing differently. </p>