Ruby 4.1.0dev (2026-09-11 revision f3ebfe5d36e70ef36d6633a009173175b2b60460)
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