public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed][nvptx] Fix __main missing prototype warning in crt0.c
@ 2019-06-18  9:20 Tom de Vries
  0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2019-06-18  9:20 UTC (permalink / raw)
  To: gcc-patches

Hi,

Atm we see:
...
libgcc/config/nvptx/crt0.c:36:1: warning: no previous prototype for \
  ‘__main’ [-Wmissing-prototypes]
...

Fix this by adding the prototype.

Build and reg-tested on nvptx.
Build and reg-tested on x86_64 with nvptx accelerator.

Committed to trunk.

Thanks,
- Tom

[nvptx] Fix __main missing prototype warning in crt0.c

2019-06-18  Tom de Vries  <tdevries@suse.de>

	* config/nvptx/crt0.c (__main): Declare.

---
 libgcc/config/nvptx/crt0.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libgcc/config/nvptx/crt0.c b/libgcc/config/nvptx/crt0.c
index 097193c708e..b3bf1475fa3 100644
--- a/libgcc/config/nvptx/crt0.c
+++ b/libgcc/config/nvptx/crt0.c
@@ -32,7 +32,9 @@ void *__nvptx_stacks[32] __attribute__((shared,nocommon));
 /* Likewise for -muniform-simt.  */
 unsigned __nvptx_uni[32] __attribute__((shared,nocommon));
 
-void __attribute__((kernel))
+extern void __main (int *, int, void **) __attribute__((kernel));
+
+void
 __main (int *rval_ptr, int argc, void **argv)
 {
   __exitval_ptr = rval_ptr;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-06-18  9:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-18  9:20 [committed][nvptx] Fix __main missing prototype warning in crt0.c Tom de Vries

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).