asan_test.C: Remove -Wno-format, add -Wno-c++1z-compat.
authorJakub Jelinek <jakub@redhat.com>
Wed, 9 Nov 2016 23:00:26 +0000 (00:00 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 9 Nov 2016 23:00:26 +0000 (00:00 +0100)
* 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
gcc/testsuite/g++.dg/asan/asan_test.C
gcc/testsuite/g++.dg/asan/dejagnu-gtest.h

index 43bbdf9eb61bb88f9a011111359d0145140995f2..62cc516183b47d8d448b4ebf978b4ce71f4e58b7 100644 (file)
@@ -1,5 +1,10 @@
 2016-11-09  Jakub Jelinek  <jakub@redhat.com>
 
+       * 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.
 
index 3cee7150f736a43a4ebd90d21da5e03b4b002691..ba6f6a34e0b79a21d5d96543ea58dcd69f4f2078 100644 (file)
@@ -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 } } }
index 2b4057c8503ea8011690f2e908ec49d79178051e..1c0fc8edfa70625e6f5a05a74463c80a47955174 100644 (file)
@@ -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)