[Top][All Lists]

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

Re: C warning in MSYS2 build

From: Paul Eggert
Subject: Re: C warning in MSYS2 build
Date: Thu, 5 Oct 2017 12:32:26 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0

On 10/05/2017 11:54 AM, Eli Zaretskii wrote:
Thanks, but it isn't new.

In my experience this kind of warning can appear and vanish almost at whim: compiling at a different optimization levels, or changing compilation in some other way, can cause GCC to omit or include the warning. So possibly Richard wasn't getting the warning a day ago, but got the warning after changing from -O2 to -O0 (or whatever), or by upgrading GCC.

If it's a major annoyance we could disable --Wnull-dereference for indent.c. I hope that's not needed, though.

Come to think of it, last year I filed a GCC bug report about a similar problem with lib-src/etags.c and -Wnull-dereference, here:


The GCC bug is not fixed yet. etags.c confused GCC by using an assignment inside an 'if' expression, which is contrary to the usual GNU style, and last year I worked around the GCC bug by changing etags.c to use a cleaner style. I notice that indent.c also has an assignment inside an 'if' expression that is relevant to these warnings. Richard, does it help to recode indent.c to use the usual GNU style, as in the attached patch? If so, let's do that instead. (Perhaps we should do that anyway....)

Attachment: indent.diff
Description: Text Data

reply via email to

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