[nvptx] Fix __main missing prototype warning in crt0.c
authorTom de Vries <tdevries@suse.de>
Tue, 18 Jun 2019 09:19:28 +0000 (09:19 +0000)
committerTom de Vries <vries@gcc.gnu.org>
Tue, 18 Jun 2019 09:19:28 +0000 (09:19 +0000)
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.

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

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

From-SVN: r272412

libgcc/ChangeLog
libgcc/config/nvptx/crt0.c

index 934733d66b86deb10ba8c1bb45ded55491f0a0cc..53acb8b33da03598a82360dac02dede5481536b1 100644 (file)
@@ -1,3 +1,7 @@
+2019-06-18  Tom de Vries  <tdevries@suse.de>
+
+       * config/nvptx/crt0.c (__main): Declare.
+
 2019-06-17  Matthew Green  <mrg@eterna.com.au>
            Maya Rashish  <coypu@sdf.org>
 
index 097193c708e728fb99da808ae47fc52cc1d12e6f..b3bf1475fa312dd9df4925c8add85be812e8b219 100644 (file)
@@ -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;