From cc38d9d60fccee37dc1e7a798efbe6fe151d03e5 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 10 Nov 2016 00:00:26 +0100 Subject: [PATCH] asan_test.C: Remove -Wno-format, add -Wno-c++1z-compat. * g++.dg/asan/asan_test.C: Remove -Wno-format, add -Wno-c++1z-compat. * g++.dg/asan/dejagnu-gtest.h (EXPECT_TRUE): Use "%s" format string in case condition contains % characters. From-SVN: r242027 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/asan/asan_test.C | 2 +- gcc/testsuite/g++.dg/asan/dejagnu-gtest.h | 3 ++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 43bbdf9eb61..62cc516183b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2016-11-09 Jakub Jelinek + * g++.dg/asan/asan_test.C: Remove -Wno-format, add + -Wno-c++1z-compat. + * g++.dg/asan/dejagnu-gtest.h (EXPECT_TRUE): Use "%s" format + string in case condition contains % characters. + PR c++/78283 * g++.dg/cpp1z/noexcept-type13.C: New test. diff --git a/gcc/testsuite/g++.dg/asan/asan_test.C b/gcc/testsuite/g++.dg/asan/asan_test.C index 3cee7150f73..ba6f6a34e0b 100644 --- a/gcc/testsuite/g++.dg/asan/asan_test.C +++ b/gcc/testsuite/g++.dg/asan/asan_test.C @@ -2,7 +2,7 @@ // { dg-skip-if "" { *-*-* } { "*" } { "-O2" } } // { dg-skip-if "" { *-*-* } { "-flto" } { "" } } // { dg-additional-sources "asan_globals_test-wrapper.cc" } -// { dg-options "-std=c++11 -fsanitize=address -fno-builtin -Wall -Wno-format -Werror -g -DASAN_UAR=0 -DASAN_HAS_EXCEPTIONS=1 -DASAN_HAS_BLACKLIST=0 -DSANITIZER_USE_DEJAGNU_GTEST=1 -lasan -lpthread -ldl" } +// { dg-options "-std=c++11 -fsanitize=address -fno-builtin -Wall -Wno-c++1z-compat -Werror -g -DASAN_UAR=0 -DASAN_HAS_EXCEPTIONS=1 -DASAN_HAS_BLACKLIST=0 -DSANITIZER_USE_DEJAGNU_GTEST=1 -lasan -lpthread -ldl" } // { dg-additional-options "-DASAN_NEEDS_SEGV=1" { target { ! arm*-*-* } } } // { dg-additional-options "-DASAN_LOW_MEMORY=1 -DASAN_NEEDS_SEGV=0" { target arm*-*-* } } // { dg-additional-options "-DASAN_AVOID_EXPENSIVE_TESTS=1" { target { ! run_expensive_tests } } } diff --git a/gcc/testsuite/g++.dg/asan/dejagnu-gtest.h b/gcc/testsuite/g++.dg/asan/dejagnu-gtest.h index 2b4057c8503..1c0fc8edfa7 100644 --- a/gcc/testsuite/g++.dg/asan/dejagnu-gtest.h +++ b/gcc/testsuite/g++.dg/asan/dejagnu-gtest.h @@ -68,7 +68,8 @@ while (0) #define EXPECT_TRUE(condition) \ if (!(condition)) \ { \ - fprintf (stderr, "EXPECT_TRUE failed: " #condition "\n"); \ + fprintf (stderr, "%s", \ + "EXPECT_TRUE failed: " #condition "\n"); \ exit (1); \ } #define EXPECT_FALSE(condition) EXPECT_TRUE (!condition) -- 2.30.2