◐ Shell
clean mode source ↗

Message 76647 - Python tracker

Attached patch just leaves Py_GCC_ATTRIBUTE as it is now.
Here is the highlight.

/*
 * Hide GCC's format attribute from compilers if one of the following is
true:
 * a) the compiler does not support it and not on RISC OS
 * b) the compiler does not support "z" printf format specifier
 */
#if ((!defined(__GNUC__) || __GNUC__ < 2 || \
     (__GNUC__ == 2 && __GNUC_MINOR__ < 3)) && \
     !defined(RISCOS)) || \
    !defined(PY_FORMAT_SIZE_T)
#define Py_GCC_FORMAT_ATTRIBUTE(type, str_idx, arg_idx)
/* Py_GCC_ATTRIBUTE is deprecated; use Py_GCC_FORMAT_ATTRIBUTE instead. */
#define Py_GCC_ATTRIBUTE(x)
#else
#define Py_GCC_FORMAT_ATTRIBUTE(type, str_idx, arg_idx) \
    __attribute__((format(type, str_idx, arg_idx)))
/* Py_GCC_ATTRIBUTE is deprecated; use Py_GCC_FORMAT_ATTRIBUTE instead. */
#define Py_GCC_ATTRIBUTE(x) __attribute__(x)
#endif