From patchwork Mon Jan 19 22:09:53 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 430715 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 B4E5C1402A0 for ; Tue, 20 Jan 2015 09:10:07 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type; q=dns; s=default; b=Aqr/HPqR3VyDynE3S O8C9Hxmv0eRJIZj3dujyF+ySMQ2btTamOU7LeiiTmorGZVP9WzqcZiAxtK0Y3Nrl xbTBJINWhK+bMcsCo5YH/8BfRYG83ip3SVq7W1OnvMzC0oR9vWfqzhQke4q+1SDx UOEO0N9AGFlwz3Hd2a3d/kRhCw= 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 :message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type; s=default; bh=8HenejJN0ECBo6pBSu3swNr 6z3U=; b=WbbL2ZLgDBpM0M/RseEFHL7DJp2lNAGpzEgHuhe6TZ20IThi33l1o3C 4FPpdmzPZz076fZSYQqwwkFrHvo48gwWexdFnOAkJ9hjE/O0azkWlXGHY3NKQ0ZF QczkuGI8vQWKNE1Jd+bBNhwRT37egz6yMHCZKLAsf+on8bCPFYfo= Received: (qmail 24415 invoked by alias); 19 Jan 2015 22:09:59 -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 24402 invoked by uid 89); 19 Jan 2015 22:09:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00, SPF_HELO_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 19 Jan 2015 22:09:57 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t0JM9tNI002199 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 19 Jan 2015 17:09:55 -0500 Received: from anchor.twiddle.net (vpn-228-203.phx2.redhat.com [10.3.228.203]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t0JM9s6K024390; Mon, 19 Jan 2015 17:09:55 -0500 Message-ID: <54BD80B1.9020900@redhat.com> Date: Mon, 19 Jan 2015 14:09:53 -0800 From: Richard Henderson User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Andreas Schwab , Ian Lance Taylor CC: Andrew Pinski , "gofrontend-dev@googlegroups.com" , GCC Patches Subject: Re: Use static chain and libffi for Go closures References: <54B83B61.1010108@redhat.com> <54BAB1B5.9010605@redhat.com> <87sif9usxk.fsf@igel.home> <54BAD370.80402@redhat.com> <87mw5huktp.fsf@igel.home> <54BAE53A.2080308@redhat.com> In-Reply-To: X-IsSubscribed: yes On 01/19/2015 02:26 AM, Andreas Schwab wrote: > Ian Lance Taylor writes: > >> @@ -83,7 +83,7 @@ >> #else /* !defined(USE_LIBFFI_CLOSURES) */ >> >> void >> -makeFuncFFI(const struct __go_func_type *ftyp, ffi_go_closure *impl) >> +makeFuncFFI(const struct __go_func_type *ftyp, void *impl) >> { >> runtime_panicstring ("libgo built without FFI does not support " >> "reflect.MakeFunc"); > > ../../../libgo/go/reflect/makefunc_ffi_c.c: In function ‘makeFuncFFI’: > ../../../libgo/go/reflect/makefunc_ffi_c.c:86:42: error: unused parameter ‘ftyp’ [-Werror=unused-parameter] > makeFuncFFI(const struct __go_func_type *ftyp, void *impl) > ^ > ../../../libgo/go/reflect/makefunc_ffi_c.c:86:54: error: unused parameter ‘impl’ [-Werror=unused-parameter] > makeFuncFFI(const struct __go_func_type *ftyp, void *impl) Fixed thus; applying to mainline after build testing a cross tomips64el-linux. Ian, I assume you'll push this upstream? r~ diff --git a/libgo/go/reflect/makefunc_ffi_c.c b/libgo/go/reflect/makefunc_ffi_c.c index 2a98e9b..06a41ef 100644 --- a/libgo/go/reflect/makefunc_ffi_c.c +++ b/libgo/go/reflect/makefunc_ffi_c.c @@ -83,7 +83,8 @@ makeFuncFFI(const struct __go_func_type *ftyp, void *impl) #else /* !defined(USE_LIBFFI_CLOSURES) */ void -makeFuncFFI(const struct __go_func_type *ftyp, void *impl) +makeFuncFFI(const struct __go_func_type *ftyp __attribute__ ((unused)), + void *impl __attribute__ ((unused))) { runtime_panicstring ("libgo built without FFI does not support " "reflect.MakeFunc");