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: Zack Weinberg
Subject: Re: AC_PROG_LEX issue when compiling with -Werror
Date: Thu, 14 Jul 2022 16:52:40 -0400
User-agent: Cyrus-JMAP/3.7.0-alpha0-755-g3e1da8b93f-fm-20220708.002-g3e1da8b9

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



reply via email to

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