https://bugs.llvm.org/show_bug.cgi?id=38091
NARUSE, Yui <nar...@airemix.jp> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |INVALID
--- Comment #2 from NARUSE, Yui <nar...@airemix.jp> ---
(In reply to Richard Smith from comment #1)
> It looks to me like it's just the *implementation* of the rb_scan_args check
> that depends on the optimizer in order to implement the check (that is, it
> generates the "bad" call unconditionally, but within a sea of conditional
> expressions that make the call unreachable in the good cases), and that the
> diagnose_if attribute is actually better suited to this kind of enforcement
> than the GCC error attribute is. Indeed, the __attribute__((error))
> enforcement will not work at -O0, and is compiled out in that case (by
> checking the __OPTIMIZE__ macro), but a diagnose_if approach would work at
> -O0.
>
> Please correct me if I've misunderstood any of the details here. But I'm
> inclined to say that Clang provides a superior alternative here.
Indeed.
I sometimes tried to use diagnose_if but failed because of Bug 38095 and Bug
38111.
Now I have a workaround and understand that the idea of Bug 38091 is come from
misunderstanding.
I committed
https://github.com/ruby/ruby/commit/4b2f2225e4a94cd2eeb8f9c8f867192f50dd6b32,
and mark this ticket as RESOLVED, thanks!
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs