From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26165 invoked by alias); 13 Jun 2012 07:43:24 -0000 Received: (qmail 26150 invoked by uid 22791); 13 Jun 2012 07:43:23 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,FSL_RCVD_USER,KHOP_THREADED,MSGID_MULTIPLE_AT,TW_YY X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.156) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 13 Jun 2012 07:43:09 +0000 Received: from md13.u-strasbg.fr (md13.u-strasbg.fr [130.79.200.248]) by mailhost.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id q5D7gpXw029788 ; Wed, 13 Jun 2012 09:42:51 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from mailserver.u-strasbg.fr (ms11.u-strasbg.fr [130.79.204.111]) by md13.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id q5D7gpN7026509 ; Wed, 13 Jun 2012 09:42:51 +0200 (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from E6510Muller (gw-ics.u-strasbg.fr [130.79.210.225]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id q5D7goR2030775 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) ; Wed, 13 Jun 2012 09:42:51 +0200 (envelope-from pierre.muller@ics-cnrs.unistra.fr) From: "Pierre Muller" To: "'Joel Brobecker'" , "'Mark Kettenis'" Cc: References: <004801cd48f1$e6599080$b30cb180$@muller@ics-cnrs.unistra.fr> <20120613043748.GB2709@adacore.com> In-Reply-To: <20120613043748.GB2709@adacore.com> Subject: RE: GDB -Wmissing-prototypes and flex troubles Date: Wed, 13 Jun 2012 07:43:00 -0000 Message-ID: <006601cd4938$21926190$64b724b0$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2012-06/txt/msg00066.txt.bz2 > Objet=A0: Re: GDB -Wmissing-prototypes and flex troubles >=20 > > Should we: > > 1) Specify a minimal version for flex? > > 2) disable missing-prototypes option > > for ada-exp.c compilation? > > 3) Do 2) if version if below > > minimum version adding those prototypes? >=20 > The lazy way would be to require a minimal version for flex. > I would be OK with that, although it is true that it is a bit of > a shame that the user does not get an error at configure time. > It should be relatively easy to do, except that this would force > me to upgrade many installs of flex on some of AdaCore's machines. > I don't mind doing the update too much, and I should, except > I usually find out at the wrong moment, and I then just get past > the error by copy/pasting the compile command, removing the -Werror > flag, and then resume the build. And also, an error would be > preventing people from building a release with an older version > of flex, even though the warnings would be harmless and non-fatal. My problem is that I don't know how to be able to use the automatic tester on a machine that I don't own, meaning that I can't upgrade flex easily... =20 > I don't think we want to unilaterally disable -Werror for ada-lex.c. > We'd open the door to allowing warnings back in again, when we did > all the work to clean them up. Please remember that ada-lex.c isn't compiled directly, it is included inside ada-exp.c source. =20 > A variation of 3. Something like the following close to the start > of ada-lex.l: >=20 > #if < <2.5.35> > /* Older versions of flex do not provide prototypes for these functions. > Provide them ourselves, to avoid -Wmissing-prototypes warnings. */ > int yylex_destroy (void ); > int yyget_debug (void ); > void yyset_debug (int debug_flag ); > YY_EXTRA_TYPE yyget_extra (void ); > [...] > #endif >=20 > I am not completly sure that this is going to work, maybe if some > types are missing, for instance. Or maybe the prototypes depend on > the version of flex. It will be even more tricky as Mark mentioned that version 2.5.4 does not seem to suffer from this problem... =20 > With all this being said, your option (3) is attractive. Except > that in terms of implementation, it forces us to have a special > rules for ada-lex.o. The ruel should be for ada-exp.o =20 > All in all, I tend to vote for the status quo... The automated script checks out a clean git HEAD, which means that the only way for me would be to added a global GDB_ERROR_CFLAGS=3D"" which seems really a bad thing to do when you want to test that your patch is not going to hurt or give new warnings :( I solved it locally by downloading 2.5.35 sources, configuring, compiling and installing in my home directory... But this is not really a nice solution either. Pierre Muller