Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Cc: Mike Stump <mikestump@comcast.net>, Iain Sandoe <iain@sandoe.co.uk>
Subject: [committed][gdb/testsuite] Fix implicit declaration of printf in gdb.objc/*.m
Date: Wed, 24 Jul 2019 17:03:00 -0000	[thread overview]
Message-ID: <20190724170313.GA11581@delia> (raw)

Hi,

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.

Committed to trunk.

Thanks,
- Tom

[gdb/testsuite] Fix implicit declaration of printf in gdb.objc/*.m

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/gdb.objc/basicclass.m | 1 +
 gdb/testsuite/gdb.objc/nondebug.m   | 1 +
 gdb/testsuite/gdb.objc/objcdecode.m | 1 +
 3 files changed, 3 insertions(+)

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


                 reply	other threads:[~2019-07-24 17:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190724170313.GA11581@delia \
    --to=tdevries@suse.de \
    --cc=gdb-patches@sourceware.org \
    --cc=iain@sandoe.co.uk \
    --cc=mikestump@comcast.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox