From 7e2dbbda357b8c509358a3aa10ff6d588ed819e2 Mon Sep 17 00:00:00 2001 From: Jeremy Evans Date: Wed, 16 Dec 2020 09:02:23 -0800 Subject: Use category: :experimental in warnings that are related to experimental features This adds rb_category_compile_warn in order to emit compiler warnings with categories. Note that Ripper currently ignores the category for these warnings, but by default it ignores the warnings completely, so this shouldn't matter. --- include/ruby/internal/error.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include/ruby') diff --git a/include/ruby/internal/error.h b/include/ruby/internal/error.h index 72ee622770..7e9d5c4167 100644 --- a/include/ruby/internal/error.h +++ b/include/ruby/internal/error.h @@ -70,12 +70,13 @@ VALUE *rb_ruby_debug_ptr(void); /* reports if `-W' specified */ PRINTF_ARGS(void rb_warning(const char*, ...), 1, 2); -PRINTF_ARGS(void rb_category_warning(rb_warning_category_t category, const char*, ...), 2, 3); +PRINTF_ARGS(void rb_category_warning(rb_warning_category_t, const char*, ...), 2, 3); PRINTF_ARGS(void rb_compile_warning(const char *, int, const char*, ...), 3, 4); +PRINTF_ARGS(void rb_category_compile_warn(rb_warning_category_t, const char *, int, const char*, ...), 4, 5); PRINTF_ARGS(void rb_sys_warning(const char*, ...), 1, 2); /* reports always */ COLDFUNC PRINTF_ARGS(void rb_warn(const char*, ...), 1, 2); -COLDFUNC PRINTF_ARGS(void rb_category_warn(rb_warning_category_t category, const char*, ...), 2, 3); +COLDFUNC PRINTF_ARGS(void rb_category_warn(rb_warning_category_t, const char*, ...), 2, 3); PRINTF_ARGS(void rb_compile_warn(const char *, int, const char*, ...), 3, 4); RBIMPL_SYMBOL_EXPORT_END() -- cgit v1.2.3