From: Martin Sebor Date: Sun, 23 Oct 2016 22:38:24 +0000 (+0000) Subject: PR target/77837 - missing -Wformat-length warning for %p with null argument on powerpc64 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=683068d61afa2d7c77f3b2faf9ff6e436a265cf1;p=gcc.git 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. From-SVN: r241457 --- 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