gdb.base/watchpoint.{c,exp}
authorPedro Alves <pedro@palves.net>
Thu, 17 Sep 2020 22:33:41 +0000 (23:33 +0100)
committerPedro Alves <pedro@palves.net>
Thu, 17 Sep 2020 23:05:39 +0000 (00:05 +0100)
commit151fdbad7a4df43fb7e5b1ef2f84622aaaa2ddb5
tree4c39710152f35200c9792b8c8c76e83e67092d3d
parent18a25b648176c70a651dc869394eef2d26d50723
gdb.base/watchpoint.{c,exp}

Adjust gdb.base/watchpoint.c so that it can be built as a C++ program.

Fixes:
gdb compile failed, src/gdb/testsuite/gdb.base/watchpoint.c:33:16: error: initializer-string for array of chars is too long [-fpermissive]
   33 | char buf[30] = "testtesttesttesttesttesttestte";
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/gdb/testsuite/gdb.base/watchpoint.c:62:14: error: expected unqualified-id before 'nullptr'
   62 | struct foo5 *nullptr;
      |              ^~~~~~~

gdb/testsuite/ChangeLog:

* gdb.base/watchpoint.c (buf): Make it 31 bytes.
(nullptr): Rename to ...
(null_ptr): ... this.
* gdb.base/watchpoint.exp: Adjust to rename.
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/watchpoint.c
gdb/testsuite/gdb.base/watchpoint.exp