[#109207] [Ruby master Feature#18915] New error class: NotImplementedYetError or scope change for NotImplementedYet — Quintasan <noreply@...>
Issue #18915 has been reported by Quintasan (Michał Zając).
18 messages
2022/07/14
[ruby-core:109238] [Ruby master Misc#18921] Remove workaround for some fixed bug (llvm.4898 & 38095)?
From:
"shyouhei (Shyouhei Urabe)" <noreply@...>
Date:
2022-07-19 00:40:52 UTC
List:
ruby-core #109238
Issue #18921 has been updated by shyouhei (Shyouhei Urabe).
Well I'm not against deleting those parts someday, but our CI still have clang-3.9 coverage. It seems we still need them.
We need to define supported versions of clang first. We do so for GCC (>=4). See #18839
----------------------------------------
Misc #18921: Remove workaround for some fixed bug (llvm.4898 & 38095)?
https://bugs.ruby-lang.org/issues/18921#change-98372
* Author: Chandler (Chandler Hen)
* Status: Open
* Priority: Normal
----------------------------------------
I notice a workaround for llvm.4898 in constant_p.h:
https://github.com/ruby/ruby/blob/master/include/ruby/internal/constant_p.h
``` c
* Note that __builtin_constant_p can be applicable inside of inline functions,
* according to GCC manual. Clang lacks that feature, though.
*
* @see https://bugs.llvm.org/show_bug.cgi?id=4898
* @see https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html
*/
#include "ruby/internal/has/builtin.h"
/** Wraps (or simulates) `__builtin_constant_p` */
#if RBIMPL_HAS_BUILTIN(__builtin_constant_p)
# define RBIMPL_CONSTANT_P(expr) __builtin_constant_p(expr)
#else
# define RBIMPL_CONSTANT_P(expr) 0
#endif
#endif /* RBIMPL_CONSTANT_P_H */
```
and a workaround for llvm.38095 in scan_args.h:
https://github.com/ruby/ruby/blob/master/include/ruby/internal/scan_args.h
``` c
/* NOTE: Use `char *fmt` instead of `const char *fmt` because of clang's bug*/
/* https://bugs.llvm.org/show_bug.cgi?id=38095 */
# define rb_scan_args0(argc, argv, fmt, varc, vars) \
rb_scan_args_set(RB_SCAN_ARGS_PASS_CALLED_KEYWORDS, argc, argv, \
rb_scan_args_n_lead(fmt), \
rb_scan_args_n_opt(fmt), \
rb_scan_args_n_trail(fmt), \
rb_scan_args_f_var(fmt), \
rb_scan_args_f_hash(fmt), \
rb_scan_args_f_block(fmt), \
(rb_scan_args_verify(fmt, varc), vars), (char *)fmt, varc)
...
```
These bugs are already marked as fixed:
bugs.llvm.org/show_bug.cgi?id=4898
bugs.llvm.org/show_bug.cgi?id=38095
Shall they be removed?
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>