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.
+2020-09-17  Pedro Alves  <pedro@palves.net>
+
+       * gdb.base/watchpoint.c (buf): Make it 31 bytes.
+       (nullptr): Rename to ...
+       (null_ptr): ... this.
+       * gdb.base/watchpoint.exp: Adjust to rename.
+
 2020-09-17  Pedro Alves  <pedro@palves.net>
 
        * gdb.base/printcmds.c (three, flag_enum_without_zero)
 
 int ival3 = -1;
 int ival4 = -1;
 int ival5 = -1;
-char buf[30] = "testtesttesttesttesttesttestte";
+char buf[31] = "testtesttesttesttesttesttestte";
 struct foo
 {
   int val;
   struct { int x; } *p;
 };
 
-struct foo5 *nullptr;
+struct foo5 *null_ptr;
 
 void marker1 ()
 {
 
     gdb_continue_to_breakpoint "func5 breakpoint here"
 
     # Check first if a null pointer can be dereferenced on the target.
-    gdb_test_multiple "p *nullptr" "" {
+    gdb_test_multiple "p *null_ptr" "" {
        -re "Cannot access memory at address 0x0.*$gdb_prompt $" {
-           gdb_test "watch -location nullptr->p->x" \
+           gdb_test "watch -location null_ptr->p->x" \
                "Cannot access memory at address 0x0"
        }
        -re ".*$gdb_prompt $" {