From 8415ced06ed9690dfbce8b8b5f2f4f98f15598b6 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Sat, 9 May 2020 20:27:40 +0200 Subject: [PATCH] testsuite: Fix up two testcases [PR95008] two-types-6.c never emitted the warning, even in 4.5/4.6, and pr93382.c doesn't have properly escaped parens, so doesn't check whether they are literally present in the message. 2020-05-09 Jakub Jelinek PR testsuite/95008 * gcc.dg/two-types-6.c: Remove dg-warning directive that never triggered. * gcc.dg/analyzer/pr93382.c: Properly escape ()s in the diagnostic message. --- gcc/testsuite/ChangeLog | 8 ++++++++ gcc/testsuite/gcc.dg/analyzer/pr93382.c | 2 +- gcc/testsuite/gcc.dg/two-types-6.c | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4c75fe20722..9deb7ac1cff 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2020-05-09 Jakub Jelinek + + PR testsuite/95008 + * gcc.dg/two-types-6.c: Remove dg-warning directive that never + triggered. + * gcc.dg/analyzer/pr93382.c: Properly escape ()s in the diagnostic + message. + 2020-05-09 Hans-Peter Nilsson * gcc.target/cris/: Adjust for removing crisv32-* and cris-linux-*. diff --git a/gcc/testsuite/gcc.dg/analyzer/pr93382.c b/gcc/testsuite/gcc.dg/analyzer/pr93382.c index bd11e10611a..c55696df0ba 100644 --- a/gcc/testsuite/gcc.dg/analyzer/pr93382.c +++ b/gcc/testsuite/gcc.dg/analyzer/pr93382.c @@ -14,7 +14,7 @@ ql (void) int n1[1]; fread (n1, sizeof (n1[0]), 1, fp); /* { dg-message "'n1' gets an unchecked value here" } */ - idx = n1[0]; /* { dg-message "'idx' has an unchecked value here (from 'n1')" } */ + idx = n1[0]; /* { dg-message "'idx' has an unchecked value here \\\(from 'n1'\\\)" } */ } int arr[10]; diff --git a/gcc/testsuite/gcc.dg/two-types-6.c b/gcc/testsuite/gcc.dg/two-types-6.c index 50fb7521ec6..a0a79316f01 100644 --- a/gcc/testsuite/gcc.dg/two-types-6.c +++ b/gcc/testsuite/gcc.dg/two-types-6.c @@ -2,6 +2,6 @@ /* { dg-options "-std=gnu89" } // suppress default -pedantic-errors */ struct s { - struct f {} /* { dg-warning "does not declare anything" } */ + struct f {} struct g {} x; /* { dg-error "expected ';', identifier or " } */ }; -- 2.30.2