help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unnecessary(?) declaration of flex


From: John P. Hartmann
Subject: Re: Unnecessary(?) declaration of flex
Date: Sat, 14 Aug 2010 17:17:07 +0200

Yes, I think that may be it.  flex used to try to support both the K&R
and ANSI style of argument declaration.

It really serves no purpose now.  Why not remove it?  Then I can
forget what I must do to shut up gcc.

Cheers,

   j.

On 14 August 2010 15:50, Hans Aberg <address@hidden> wrote:
> On 14 Aug 2010, at 10:56, John P. Hartmann wrote:
>
>> What is the purpose of this declaration in the generated C file:
>>
>> extern int yylex (void);
>>
>> I can see that I can define a macro to turn it off, but it seems to
>> serve no purpose as the function is defined anyhow about fifteen lines
>> below.  I suppose a purist might even object to "extern".
>
> It might be a remnant from the past(?), without proper header files. Then
> two style was to include the lexer .c file, or not do it, and the latter
> case the declaration of yylex() would be needed.
>
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]