summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2019-07-24 19:01:59 +0200
committerTom de Vries <tdevries@suse.de>2019-07-24 19:01:59 +0200
commitb3b965fb91e1671da5b7d42349fa0d78e80c29f4 (patch)
treee999305757c275486580c6efdd005e9469189274
parent8f79c1075e8f258ac5a909b39704009ebc440e76 (diff)
downloadbinutils-b3b965fb91e1671da5b7d42349fa0d78e80c29f4.tar.gz
binutils-b3b965fb91e1671da5b7d42349fa0d78e80c29f4.tar.xz
binutils-b3b965fb91e1671da5b7d42349fa0d78e80c29f4.zip
[gdb/testsuite] Fix implicit declaration of printf in gdb.objc/*.m
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.
-rw-r--r--gdb/testsuite/ChangeLog7
-rw-r--r--gdb/testsuite/gdb.objc/basicclass.m1
-rw-r--r--gdb/testsuite/gdb.objc/nondebug.m1
-rw-r--r--gdb/testsuite/gdb.objc/objcdecode.m1
4 files changed, 10 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index dde5e9cb4d..62701ed717 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,12 @@
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
* gdb.base/infoline-reloc-main-from-zero.exp: Add -Wl,-N to
additional_flags.
diff --git a/gdb/testsuite/gdb.objc/basicclass.m b/gdb/testsuite/gdb.objc/basicclass.m
index 0de12db25a..d9b3f23954 100644
--- a/gdb/testsuite/gdb.objc/basicclass.m
+++ b/gdb/testsuite/gdb.objc/basicclass.m
@@ -1,3 +1,4 @@
+#include <stdio.h>
#include <objc/Object.h>
@interface BasicClass: Object
diff --git a/gdb/testsuite/gdb.objc/nondebug.m b/gdb/testsuite/gdb.objc/nondebug.m
index dcbdde936c..352a71c30e 100644
--- a/gdb/testsuite/gdb.objc/nondebug.m
+++ b/gdb/testsuite/gdb.objc/nondebug.m
@@ -1,3 +1,4 @@
+#include <stdio.h>
#include <objc/Object.h>
@interface NonDebug: Object
diff --git a/gdb/testsuite/gdb.objc/objcdecode.m b/gdb/testsuite/gdb.objc/objcdecode.m
index 5e99618d11..a061661ed9 100644
--- a/gdb/testsuite/gdb.objc/objcdecode.m
+++ b/gdb/testsuite/gdb.objc/objcdecode.m
@@ -1,3 +1,4 @@
+#include <stdio.h>
#include <objc/Object.h>
@interface Decode: Object