From patchwork Tue Jun 18 09:20:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 1117757 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-503151-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="x/FQ2rEB"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45SjHR3T7Fz9s7h for ; Tue, 18 Jun 2019 19:20:49 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=hE2U5jFGnELxml+w NTIttJSMUyVg8a+IhvbNj7EbMVz57XzKKrQwBIllxmeR2wnVs6ysW7jtOfWn4vxN H3yFaOzyi8Wpo5KBi6derMouybfJxPxsQgHjF3Ss8DRwXRMZ0TD3KzA7QBq3k8xB bi80uGLAYuYiXjFwyUkBEj12pgk= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type :content-transfer-encoding; s=default; bh=986jAZd2VcDTQrwBOgL61n DRUrg=; b=x/FQ2rEBqUjKbzK4ZxpqQTHLqixM3xzC/EWOYd1GX/qdWYARG3qEpC ijTtRYyl9y+cG9NNuU7YCVEWBenhdF0xS0O5Z3IBeWX7VoZeRMxl4ED2t4bI0bko 2yPLOa7pLEKHQkAq90I+S7WMy0s/2qmdZB/Y+RFeJjRrihChUmc4Y= Received: (qmail 9866 invoked by alias); 18 Jun 2019 09:20:42 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 9857 invoked by uid 89); 18 Jun 2019 09:20:42 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-24.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.1 spammy=HContent-Transfer-Encoding:8bit X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 18 Jun 2019 09:20:41 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 0B82AAD09 for ; Tue, 18 Jun 2019 09:20:38 +0000 (UTC) Date: Tue, 18 Jun 2019 11:20:37 +0200 From: Tom de Vries To: gcc-patches@gcc.gnu.org Subject: [committed][nvptx] Fix __main missing prototype warning in crt0.c Message-ID: <20190618092035.GA2874@delia> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-IsSubscribed: yes 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 * 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;