From cf75bb6699e014af9f11da95034fca8f5126638e Mon Sep 17 00:00:00 2001 From: Kp Date: Tue, 15 Jul 2014 02:53:23 +0000 Subject: [PATCH] Define away printf %s check if __builtin_constant_p not available --- common/include/fmtcheck.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common/include/fmtcheck.h b/common/include/fmtcheck.h index cf3b37655..cc767c43d 100644 --- a/common/include/fmtcheck.h +++ b/common/include/fmtcheck.h @@ -24,9 +24,14 @@ #define _dxx_call_printf_delete_comma2(A,...) __VA_ARGS__ #define _dxx_call_printf_delete_comma(A,...) _dxx_call_printf_delete_comma2( A , ## __VA_ARGS__ ) +#if defined(DXX_HAVE_BUILTIN_CONSTANT_P) && defined(DXX_HAVE_EMBEDDED_COMPOUND_STATEMENT) #define _dxx_printf_check_has_nontrivial_format_string(V,P,FMT) \ ((void)((dxx_builtin_constant_p((FMT)) && (FMT)[0] == '%' && (FMT)[1] == 's' && (FMT)[2] == 0) && \ _dxx_printf_raise_error(dxx_trap_trivial_string_specifier_argument_##V, "bare %s argument to " #V "; use " #P " directly"))) +#else +#define _dxx_printf_check_has_nontrivial_format_string(V,P,FMT) \ + ((void)(FMT)) +#endif #define dxx_call_printf_checked(V,P,A,FMT,...) \ ( \