From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4278 invoked by alias); 13 Jun 2012 05:58:15 -0000 Received: (qmail 4269 invoked by uid 22791); 13 Jun 2012 05:58:14 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,TW_YY,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO glazunov.sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 13 Jun 2012 05:58:01 +0000 Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3) with ESMTP id q5D5vaR4017995; Wed, 13 Jun 2012 07:57:36 +0200 (CEST) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3/Submit) id q5D5vXFL014513; Wed, 13 Jun 2012 07:57:34 +0200 (CEST) Date: Wed, 13 Jun 2012 05:58:00 -0000 Message-Id: <201206130557.q5D5vXFL014513@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: brobecker@adacore.com CC: pierre.muller@ics-cnrs.unistra.fr, gdb@sourceware.org In-reply-to: <20120613043748.GB2709@adacore.com> (message from Joel Brobecker on Tue, 12 Jun 2012 21:37:48 -0700) Subject: Re: GDB -Wmissing-prototypes and flex troubles References: <004801cd48f1$e6599080$b30cb180$@muller@ics-cnrs.unistra.fr> <20120613043748.GB2709@adacore.com> 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/msg00065.txt.bz2 > Date: Tue, 12 Jun 2012 21:37:48 -0700 > From: Joel Brobecker > > > 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? > > 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. > > 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. > > A variation of 3. Something like the following close to the start > of ada-lex.l: > > #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 > > 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. > > 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. > > All in all, I tend to vote for the status quo... Same here. The version of flex in the OpenBSD base system reports itself as 2.5.4, yet I don't see the problem that Pierre reports. So it seems that the problem was introduced in a later version and then fixed again. Given that there is a workaround, and releases don't suffer from the problem because we disable -Werror there, I'd say we leave things as they are.