From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27572 invoked by alias); 7 Oct 2014 16:15:28 -0000 Mailing-List: contact java-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-patches-owner@gcc.gnu.org Received: (qmail 27551 invoked by uid 89); 7 Oct 2014 16:15:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients 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; Tue, 07 Oct 2014 16:15:26 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s97GFNpe003451 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 7 Oct 2014 12:15:23 -0400 Received: from redhat.com (ovpn-116-41.ams2.redhat.com [10.36.116.41]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s97GFJaC032479 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NO); Tue, 7 Oct 2014 12:15:22 -0400 Date: Tue, 07 Oct 2014 16:15:00 -0000 From: Marek Polacek To: Tom Tromey Cc: java-patches@gcc.gnu.org, GCC Patches Subject: Re: [Java PATCH] Generate declarations in jvgenmain.c Message-ID: <20141007161518.GI3503@redhat.com> References: <20141007083129.GB3503@redhat.com> <87fvezrho1.fsf@tromey.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87fvezrho1.fsf@tromey.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SW-Source: 2014-q4/txt/msg00017.txt.bz2 On Tue, Oct 07, 2014 at 10:03:26AM -0600, Tom Tromey wrote: > >>>>> "Marek" == Marek Polacek writes: > > Marek> [CCing java-patches now] > Marek> Java testsuite breaks with -std=gnu11 as a default and/or with > Marek> -Wimplicit-function-declaration on > > I don't recall how one gets warnings when compiling this generated code, > but if it is generally possible then I think this: I'm not sure I understand, but this piece of code gets compiled when running the libjava testsuite. And when the warning triggers, we get many fails. > Marek> + if (indirect) > Marek> + fprintf (stream, "extern void JvRunMainName ();\n"); > Marek> + else > Marek> + fprintf (stream, "extern void JvRunMain ();\n"); > > ... will fail with -Wstrict-prototypes, since in C those should > read "(void)" rather than "()". > > If it's not possible then no big deal. I saw declarations of JvRunMain{,Name} with no parameters and with some parameters. So I decided to make it prototype-less function declaration for now. I think we don't have to worry about -Wstrict-prototypes for now. Marek