[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lmi] [lmi-commits] master bdeeca5c 5/5: Improve technique to displa
Re: [lmi] [lmi-commits] master bdeeca5c 5/5: Improve technique to display disabled warnings
Tue, 21 Mar 2023 12:34:19 +0100
On Mon, 20 Mar 2023 22:36:55 +0000 Greg Chicares <email@example.com>
GC> On 6/12/22 17:32, Vadim Zeitlin wrote:
GC> > a link to my small project which might be handy:
GC> > https://github.com/vadz/gcc-warnings-tools
GC> > and direct links to the tables generated by it:
GC> > https://github.com/vadz/gcc-warnings-tools/wiki/gcc-warnings
GC> > https://github.com/vadz/gcc-warnings-tools/wiki/all-gcc-warnings
GC> > warnings added in a new gcc release. E.g., after just updating the pages
GC> > above for gcc 12, looking at the changes you can see that it added the
GC> > following new warnings not enabled by -Wall (or by default):
GC> > infinite-recursion, openacc-parallelism, trivial-auto-var-init and
GC> > use-after-free, some of which might be useful to explore when lmi starts
GC> > using it.
GC> I've explicitly enabled these two:
GC> and they engender no new diagnostic anywhere in lmi.
IMO the first one doesn't make much sense without using OpenACC, so it
seems a bit weird to enable it, but it's not going to do any harm, of
GC> The other three:
GC> do seem to be enabled by '-Wall',
Yes, this is indeed the case according to gcc sources too.
GC> The use-after-free one is weird
It's indeed weird because according to gcc change log it was added on
2022-01-15 but then removed on 2022-03-30. However what really happened is
that the option has been added in 671a283636d (Add -Wuse-after-free
[PR80532]., 2022-01-15) with incorrect comment syntax in the file
containing the options (gcc/c-family/c.opt) and this was fixed later, so
the change log is just wrong.
GC> speaks only of
GC> whereas the "warnings" page
GC> says that
GC> is enabled by '-Wall'.
This option is actually documented together with the other C++-specific
GC> At first, I thought that the "analyzer-" part might have been a
GC> typographical error
No, these are the options for the gcc static analyzer that is still being
worked on. It promises to be useful, but so far it's still unsuitable for
use with C++ (or at least it was when I looked at it the last time a couple
of months ago).
Description: PGP signature