From 58a99d5719c031e4dfc3911364e9aec1f7ce2a2c Mon Sep 17 00:00:00 2001 From: msebor Date: Sun, 23 Oct 2016 22:38:24 +0000 Subject: 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 --- gcc/ChangeLog | 6 ++++++ gcc/config/rs6000/linux.h | 4 ++++ gcc/config/rs6000/linux64.h | 4 ++++ 3 files changed, 14 insertions(+) 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 + + 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 * 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 -- cgit v1.2.1