1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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.
This commit is contained in:
Jeremy Evans 2020-12-16 09:02:23 -08:00
parent 05313c914b
commit 7e2dbbda35
Notes: git 2020-12-19 02:54:38 +09:00
4 changed files with 24 additions and 6 deletions

View file

@ -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()