emacs-devel
[Top][All Lists]
Advanced

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

Re: C warning in MSYS2 build


From: Richard Copley
Subject: Re: C warning in MSYS2 build
Date: Thu, 5 Oct 2017 21:08:06 +0100

On 5 October 2017 at 20:32, Paul Eggert <address@hidden> wrote:
> 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:
>
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71157
>
> 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....)

Thanks Eli and Paul.
The warnings don't change with that patch.
FWIW it seems to me that the results of the buffer_display_table calls
in c_string_width and lisp_string_width are dereferenced unchecked,
in character.c.



reply via email to

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