On Thu, 2024-07-11 at 10:36 -0300, Alexandre Oliva wrote:
> 
> The analyzer testsuite, on a customer's own operating system, reports
> a potential NULL pointer dereference in flex-without-call-
> summaries.c.
> I'm not sure why it shows up on that system, but not on others, but
> the test is not meant to test for that warning, so I'm silencing it.

Hi Alex

I intended that particular test as an integration test, to try to make
sure that -fanalyzer is silent on the result of a minimal "flex"
script.  So if we're actually getting warnings, that's undesirable, and
I'm not sure the approach in your patch is the right one.

Given that the testcase includes various C headers, there's going to be
some variability with different configurations.  Are you able to share
the preprocessed sources with me?  Maybe we should eliminate those
#includes from that test and convert it to something that's more
config-independent?

Thanks
Dave


> 
> Regstrapped on x86_64-linux-gnu, also tested with gcc-13 targeting
> aarch64.  Ok to install?
> 
> 
> for  gcc/testsuite/ChangeLog
> 
>         * c-c++-common/analyzer/flex-without-call-summaries.c:
> Disable
>         null dereference analyzer warnings.
> ---
>  .../analyzer/flex-without-call-summaries.c         |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/gcc/testsuite/c-c++-common/analyzer/flex-without-call-
> summaries.c b/gcc/testsuite/c-c++-common/analyzer/flex-without-call-
> summaries.c
> index c6ecb25d25d59..1aad2bc896b7e 100644
> --- a/gcc/testsuite/c-c++-common/analyzer/flex-without-call-
> summaries.c
> +++ b/gcc/testsuite/c-c++-common/analyzer/flex-without-call-
> summaries.c
> @@ -3,6 +3,7 @@
>  
>  /* { dg-additional-options "-fno-analyzer-call-summaries" } */
>  
> +/* { dg-additional-options "-Wno-analyzer-null-dereference" } */
>  /* { dg-additional-options "-Wno-analyzer-too-complex" } */
>  /* { dg-additional-options "-D_POSIX_SOURCE" } */
>  
> 

Reply via email to