diff options
author | Tom de Vries <tdevries@suse.de> | 2019-06-18 09:19:28 +0000 |
---|---|---|
committer | Tom de Vries <vries@gcc.gnu.org> | 2019-06-18 09:19:28 +0000 |
commit | 787783a0356dd75e462c9d5337f06f156e0ed110 (patch) | |
tree | bf0ffbd03049599bb0d9a565b60705faaf831c20 | |
parent | fcae0292de06aeb54c44d26cfb80d798df60e339 (diff) | |
download | gcc-787783a0356dd75e462c9d5337f06f156e0ed110.zip gcc-787783a0356dd75e462c9d5337f06f156e0ed110.tar.gz gcc-787783a0356dd75e462c9d5337f06f156e0ed110.tar.bz2 |
[nvptx] Fix __main missing prototype warning in crt0.c
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
-rw-r--r-- | libgcc/ChangeLog | 4 | ||||
-rw-r--r-- | libgcc/config/nvptx/crt0.c | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 934733d..53acb8b 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -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> diff --git a/libgcc/config/nvptx/crt0.c b/libgcc/config/nvptx/crt0.c index 097193c..b3bf147 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; |