Joel Brobecker | 13 Jun 2012 06:37
Favicon

Re: GDB -Wmissing-prototypes and flex troubles

>   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 );
(Continue reading)

Mark Kettenis | 13 Jun 2012 07:57
Picon
Picon
Favicon

Re: GDB -Wmissing-prototypes and flex troubles

> Date: Tue, 12 Jun 2012 21:37:48 -0700
> From: Joel Brobecker <brobecker <at> 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>
(Continue reading)

Pierre Muller | 13 Jun 2012 09:42
Picon

RE: GDB -Wmissing-prototypes and flex troubles

> Objet : Re: GDB -Wmissing-prototypes and flex troubles
> 
> >   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.

  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...

> 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,
(Continue reading)


Gmane