Re: AC_PROG_LEX issue when compiling with -Werror

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

 



On Thu, Jul 14, 2022, at 9:56 AM, Todd C. Miller wrote:
> On Thu, 14 Jul 2022 12:03:42 +0200, Tobias Brunner wrote:
>> [AC_PROG_LEX fails because of] 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]
...
> Why not just fix your flex.skl so it doesn't produce code that
> generates a warning?  We fixed this problem in OpenBSD so you can
> probably just adapt the indentation changes

That is a good idea regardless, but please be aware that running _any_ autoconf test with -Werror enabled is officially not supported as of version 2.70.  There are just too many ways in which our test code is not up to the standards of modern compilers, and some of them are very hard to fix (e.g. AC_CHECK_FUNCS doesn't have any way of knowing what header(s) are needed for each function it tries to detect, or how to call it properly).  I endorse Paul's suggestion of putting -Werror in a separate Makefile variable that is added to CFLAGS by Make but not by configure.

zw




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

  Powered by Linux