From: Jakub Jelinek Date: Wed, 9 Nov 2016 23:00:26 +0000 (+0100) Subject: asan_test.C: Remove -Wno-format, add -Wno-c++1z-compat. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cc38d9d60fccee37dc1e7a798efbe6fe151d03e5;p=gcc.git 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 --- 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)