From: Mark Kettenis <mark.kettenis@xs4all.nl>
To: brobecker@adacore.com
Cc: pierre.muller@ics-cnrs.unistra.fr, gdb@sourceware.org
Subject: Re: GDB -Wmissing-prototypes and flex troubles
Date: Wed, 13 Jun 2012 05:58:00 -0000 [thread overview]
Message-ID: <201206130557.q5D5vXFL014513@glazunov.sibelius.xs4all.nl> (raw)
In-Reply-To: <20120613043748.GB2709@adacore.com> (message from Joel Brobecker on Tue, 12 Jun 2012 21:37:48 -0700)
> Date: Tue, 12 Jun 2012 21:37:48 -0700
> From: Joel Brobecker <brobecker@adacore.com>
>
> > 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 <FLEX_VERSION> < <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.
next prev parent reply other threads:[~2012-06-13 5:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-12 23:20 Pierre Muller
2012-06-13 4:38 ` Joel Brobecker
2012-06-13 5:58 ` Mark Kettenis [this message]
2012-06-13 7:43 ` Pierre Muller
2012-06-13 19:36 ` Joel Brobecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201206130557.q5D5vXFL014513@glazunov.sibelius.xs4all.nl \
--to=mark.kettenis@xs4all.nl \
--cc=brobecker@adacore.com \
--cc=gdb@sourceware.org \
--cc=pierre.muller@ics-cnrs.unistra.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).