Ruby 4.1.0dev (2026-03-27 revision afe5f77a2610a6dfcb0df196723cd2e7012208d6)
format.h
Go to the documentation of this file.
1
4#ifndef PRISM_COMPILER_FORMAT_H
5#define PRISM_COMPILER_FORMAT_H
6
13#if defined(__GNUC__)
14# if defined(__MINGW_PRINTF_FORMAT)
15# define PRISM_ATTRIBUTE_FORMAT(fmt_idx_, arg_idx_) __attribute__((format(__MINGW_PRINTF_FORMAT, fmt_idx_, arg_idx_)))
16# else
17# define PRISM_ATTRIBUTE_FORMAT(fmt_idx_, arg_idx_) __attribute__((format(printf, fmt_idx_, arg_idx_)))
18# endif
19#elif defined(__clang__)
20# define PRISM_ATTRIBUTE_FORMAT(fmt_idx_, arg_idx_) __attribute__((__format__(__printf__, fmt_idx_, arg_idx_)))
21#else
22# define PRISM_ATTRIBUTE_FORMAT(fmt_idx_, arg_idx_)
23#endif
24
25#endif