autoconf
[Top][All Lists]
Advanced

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

Re: AC_PROG_LEX issue when compiling with -Werror


From: Tobias Brunner
Subject: Re: AC_PROG_LEX issue when compiling with -Werror
Date: Thu, 14 Jul 2022 17:17:01 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1

On 14.07.22 15:56, Todd C. Miller wrote:
On Thu, 14 Jul 2022 12:03:42 +0200, Tobias Brunner wrote:

This is caused by the following warnings turned errors from the
generated lexer:

lex.yy.c:673:13: error: misleading indentation; statement is not part of
the previous 'if' [-Werror,-Wmisleading-indentation]
              if ( ! (yy_state_buf) )
              ^
lex.yy.c:671:9: note: previous statement is here
          if ( ! (yy_state_buf) )
          ^
lex.yy.c:1107:3: error: misleading indentation; statement is not part of
the previous 'if' [-Werror,-Wmisleading-indentation]
                  return yy_is_jam ? 0 : yy_current_state;
                  ^
lex.yy.c:1104:2: note: previous statement is here
          if ( ! yy_is_jam )
          ^

Note that these warnings are not triggered for our own lexers,
presumably because we don't use REJECT, which seems to generate the
above code.  That is, building with -Werror works just fine if the
library check is bypassed.

Why not just fix your flex.skl so it doesn't produce code that
generates a warning?

Thanks for the tip. Apparently, it's an issue in version 2.6.4 of flex, which is the latest official release on which both the port and the version integrated in FreeBSD itself (wasn't aware of that) are based. The release is from 2017 and the skeleton file has since been fixed in master [1]. Unfortunately, there hasn't been a release based on that code yet. For now, I've filed a bug report against the port [2].

Regards,
Tobias

[1] https://github.com/westes/flex/commit/103634e4ca84ff014b20ef0e9cf726ef5980592d
[2] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=265213



reply via email to

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