[gdb/testsuite] Fix implicit declaration of printf in gdb.objc/*.m
authorTom de Vries <tdevries@suse.de>
Wed, 24 Jul 2019 17:01:59 +0000 (19:01 +0200)
committerTom de Vries <tdevries@suse.de>
Wed, 24 Jul 2019 17:01:59 +0000 (19:01 +0200)
When running gdb.objc/objcdecode.exp we get:
...
objcdecode.m: In function '-[Decode multipleDef]':
objcdecode.m:14:3: warning: incompatible implicit declaration of built-in \
  function 'printf'
   printf("method multipleDef\n");
   ^~~~~~
objcdecode.m:14:3: note: include '<stdio.h>' or provide a declaration of \
  'printf'
...

Fix this in the three gdb.objc/*.m test-cases by including stdio.h.

Tested on x86_64-linux.

gdb/testsuite/ChangeLog:

2019-07-24  Tom de Vries  <tdevries@suse.de>

PR testsuite/24807
* gdb.objc/basicclass.m: Include stdio.h.
* gdb.objc/nondebug.m: Same.
* gdb.objc/objcdecode.m: Same.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.objc/basicclass.m
gdb/testsuite/gdb.objc/nondebug.m
gdb/testsuite/gdb.objc/objcdecode.m

index dde5e9cb4df48ca1ff4e4b3b3a5fdb30db4e8424..62701ed71731f44d0f25333cb1a86bd844de3b4a 100644 (file)
@@ -1,3 +1,10 @@
+2019-07-24  Tom de Vries  <tdevries@suse.de>
+
+       PR testsuite/24807
+       * gdb.objc/basicclass.m: Include stdio.h.
+       * gdb.objc/nondebug.m: Same.
+       * gdb.objc/objcdecode.m: Same.
+
 2019-07-24  Tom de Vries  <tdevries@suse.de>
 
        PR testsuite/24612
index 0de12db25a1b6e583870f56f1a00fa5579395ebc..d9b3f23954cac6d0e83d47f8642defea89e3faf9 100644 (file)
@@ -1,3 +1,4 @@
+#include <stdio.h>
 #include <objc/Object.h>
 
 @interface BasicClass: Object
index dcbdde936c7f15ea03b20f43f493f26dc99c9b9a..352a71c30e305c0b55a8c5194a36c2849c7e891c 100644 (file)
@@ -1,3 +1,4 @@
+#include <stdio.h>
 #include <objc/Object.h>
 
 @interface NonDebug: Object
index 5e99618d115d5403834130527e7f2b1488ed438a..a061661ed93b3bad276a2e2046e0fb46d21a94b7 100644 (file)
@@ -1,3 +1,4 @@
+#include <stdio.h>
 #include <objc/Object.h>
 
 @interface Decode: Object