[Top][All Lists]

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

Re: [Emacs-diffs] master 6cd5678: Clarify compiler-pacifier in frame.c

From: Paul Eggert
Subject: Re: [Emacs-diffs] master 6cd5678: Clarify compiler-pacifier in frame.c
Date: Sun, 25 Aug 2019 23:34:25 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0

Newer GCC is smart enough to figure this out, at least with the default
I believe the warning came from a compilation with GCC 9.2.

With default optimizations? In that case an UNINIT is called for indeed. Although it is a bit odd that I'm not seeing a problem with GCC 9.2 (x86-64, built for RHEL 7.6), the oddity could be due to other platform differences.

UNINIT ... only works in a Git repository.
So it's a semi-kludgey semi-solution, not really better
than an explicit initialization with a comment.

UNINIT works outside of Git repositories, since it depends on GCC_LINT which can be set independently of whether one is in a Git repository. I regularly use this feature.

And UNINIT allows one to use tools other than GCC to diagnose improper use of uninitialized variables, whereas an explicit initialization would prevent using these tools. I use this feature occasionally as well.

Admittedly UNINIT is a bit of a kludge, but it's the best kludge we have in the area.

reply via email to

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