public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Moving analyzer tests to c-c++-common
@ 2023-06-06 12:10 Benjamin Priour
  0 siblings, 0 replies; only message in thread
From: Benjamin Priour @ 2023-06-06 12:10 UTC (permalink / raw)
  To: David Malcolm; +Cc: gcc

Hi David,

Sorry I didn't answer you earlier, I was busy concluding my term.
Finally finished yesterday, I now have 100% of my time for GCC.

I build yesterday the analyzer with -fanalyzer enabled. Globally there
are not many coherent warnings, and a common issue are the thesis-long
warnings.
Below are the headers of these warnings, the first two were emitted
dozen of times across the build.
I'll look into these two particularly as it would clean up a lot of
noise easily enough.

../../gcc/gcc/wide-int.h:1338:30: warning: use of uninitialized value
‘‘result_decl’ not supported by dump_expr<expression error>’ [CWE-457]
[-Wanalyzer-use-of-uninitialized-value]
../../gcc/gcc/analyzer/bounds-checking.cc:658:44: warning: use of
uninitialized value ‘<unknown>’ [CWE-457]
[-Wanalyzer-use-of-uninitialized-value]
../../gcc/gcc/make-unique.h:41:30: warning: use of possibly-NULL
‘operator new(120)’ where non-null expected [CWE-690]
[-Wanalyzer-possible-null-argument]

I'm also adding new tests for c++.
Specifically I'm writing tests for the operators [placement] new and
delete, as a number of false-positives occurred repeatedly when
building the analyzer.
I'm also reediting some of the c tests but with their c++
counterparts, such as using the standard libraries containers and see
how the analyzer behaves.

Should I put them under c-c++-common or c++ ? With a new analyzer
folder and analyzer.exp I guess.
For the warnings diving too deep into the standard library, I
considered adding a flag to the analyzer to control the maximum depth
of the warnings.

Have a nice day,
Benjamin.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-06-06 12:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-06 12:10 Moving analyzer tests to c-c++-common Benjamin Priour

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).