summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormsebor <msebor@138bc75d-0d04-0410-961f-82ee72b054a4>2016-10-23 22:38:24 +0000
committermsebor <msebor@138bc75d-0d04-0410-961f-82ee72b054a4>2016-10-23 22:38:24 +0000
commit58a99d5719c031e4dfc3911364e9aec1f7ce2a2c (patch)
treecb1e375bdb10604d5159e998b898a492ff3f5913
parenta484f6fec945c3ef1661e57ae8b20a6616fb2925 (diff)
downloadgcc-58a99d5719c031e4dfc3911364e9aec1f7ce2a2c.tar.gz
PR target/77837 - missing -Wformat-length warning for %p with null argument on powerpc64
gcc/ChangeLog: PR target/77837 * config/rs6000/linux.h (TARGET_PRINTF_POINTER_FORMAT): Define. * config/rs6000/linux64.h (TARGET_PRINTF_POINTER_FORMAT): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@241457 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/rs6000/linux.h4
-rw-r--r--gcc/config/rs6000/linux64.h4
3 files changed, 14 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 0522114feb7..4c4583ecc5c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2016-10-23 Martin Sebor <msebor@redhat.com>
+
+ PR target/77837
+ * config/rs6000/linux.h (TARGET_PRINTF_POINTER_FORMAT): Define.
+ * config/rs6000/linux64.h (TARGET_PRINTF_POINTER_FORMAT): Likewise.
+
2016-10-23 Eric Botcazou <ebotcazou@adacore.com>
* config/sparc/sparc.md (cpu_feature): Minor tweak.
diff --git a/gcc/config/rs6000/linux.h b/gcc/config/rs6000/linux.h
index ac9296d79ec..a28e17f966c 100644
--- a/gcc/config/rs6000/linux.h
+++ b/gcc/config/rs6000/linux.h
@@ -138,3 +138,7 @@
|| (TARGET_GLIBC_MAJOR == 2 && TARGET_GLIBC_MINOR >= 19)
#define RS6000_GLIBC_ATOMIC_FENV 1
#endif
+
+/* The format string to which "%p" corresponds. */
+#undef TARGET_PRINTF_POINTER_FORMAT
+#define TARGET_PRINTF_POINTER_FORMAT linux_printf_pointer_format
diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
index 0101ec0ac69..7de51ea81a4 100644
--- a/gcc/config/rs6000/linux64.h
+++ b/gcc/config/rs6000/linux64.h
@@ -640,3 +640,7 @@ extern int dot_symbols;
enabling the __float128 keyword. */
#undef TARGET_FLOAT128_ENABLE_TYPE
#define TARGET_FLOAT128_ENABLE_TYPE 1
+
+/* The format string to which "%p" corresponds. */
+#undef TARGET_PRINTF_POINTER_FORMAT
+#define TARGET_PRINTF_POINTER_FORMAT linux_printf_pointer_format