Re: AC_PROG_LEX issue when compiling with -Werror

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

 



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




[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux