https://bugs.llvm.org/show_bug.cgi?id=51228

Aaron Ballman <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |WONTFIX
             Status|NEW                         |RESOLVED

--- Comment #5 from Aaron Ballman <[email protected]> ---
(In reply to David Blaikie from comment #4)
> Yeah, generally I'd consider this "working as intended".
> 
> Indeed this functionality is explicitly documented as such:
> https://releases.llvm.org/6.0.0/tools/clang/docs/AttributeReference.
> html#nodiscard-warn-unused-result-clang-warn-unused-result-gnu-warn-unused-
> result

+1, I consider this to be working as intended. The linked discussion of the GCC
bug report is interesting, but doesn't really make a compelling case for why a
cast to void to silence the warning is undesirable. Silencing this diagnostic
by casting to void is not unexpected behavior for users (as the GCC bug report
shows). Even if it was, changing that now would break user's code if they're
compiling with -Werror.

I'm resolving as WONTFIX because this is behaving by design, but that doesn't
mean discussion on the topic has to end (if someone wants to build a compelling
case that also considers the potential for breaking code relying on this
silencing mechanism, we can always reopen the issue).

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to