bug-autoconf
[Top][All Lists]
Advanced

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

Re: AC_PROG_LEX broken on IRIX with MIPSpro Compilers


From: Peter O'Gorman
Subject: Re: AC_PROG_LEX broken on IRIX with MIPSpro Compilers
Date: Sat, 29 Dec 2007 10:53:50 -0600
User-agent: Thunderbird 2.0.0.9 (X11/20071115)

Paul Eggert wrote:
> "Peter O'Gorman" <address@hidden> writes:
> 
>> After macro expansion that line turns into:
>> { do { *yy_cp = yy_hold_char;  yy_c_buf_p = yy_cp = yy_bp + input () !=
>> 0 - 0; yytext = yy_bp; yyleng = (int) (yy_cp - yy_bp); yy_hold_char =
>> *yy_cp; *yy_cp = '\0'; yy_c_buf_p = yy_cp;; } while ( 0 ); }
> 
> This indicates that your implementation of 'lex' is broken; that is an
> invalid macro expansion for that line.  Apparently your 'lex' defines
> the yyless macro without properly parenthesizing its arguments.  This
> bug should be fixed on your platform, regardless of what we do with
> Autoconf.
> 
> Currently _AC_PROG_LEX_YYTEXT_DECL checks for several 'lex' features,
> and causes problems such as you describe if any of these features have
> certain bugs.  It's not clear to me why it does so (the comment just
> talks about the output root and so forth).  Perhaps Akim can chime in
> here?  I think that's his invention.


It is GNU flex-2.5.4 (although it does appear to be fixed in 2.5.31,
where the macro expansion gives:
{ do { int yyless_macro_arg = (input () != 0); ; *yy_cp =
(yy_hold_char); (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - 0;
(yytext) = yy_bp; yyleng = (size_t) (yy_cp - yy_bp); (yy_hold_char) =
*yy_cp; *yy_cp = '\0'; (yy_c_buf_p) = yy_cp;; } while ( 0 ); }

I see no reason why autoconf should not work with flex-2.5.4 though.

Peter
-- 
Peter O'Gorman
http://pogma.com




reply via email to

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