Ruby 4.1.0dev (2026-05-15 revision 4d87d43b01dbb312eb1ff5fbbc6c9f33218d91a2)
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