<div dir="auto"><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 17 Oct 2019, 05:17 Stephan Bergmann via cfe-commits, <<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 09/10/2019 04:04, Richard Smith via cfe-commits wrote:<br>
> Author: rsmith<br>
> Date: Tue Oct  8 19:04:54 2019<br>
> New Revision: 374135<br>
> <br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=374135&view=rev" rel="noreferrer noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=374135&view=rev</a><br>
> Log:<br>
> [c++20] P1152R4: warn on any simple-assignment to a volatile lvalue<br>
> whose value is not ignored.<br>
> <br>
> We don't warn on all the cases that are deprecated: specifically, we<br>
> choose to not warn for now if there are parentheses around the<br>
> assignment but its value is not actually used. This seems like a more<br>
> defensible rule, particularly for cases like sizeof(v = a), where the<br>
> parens are part of the operand rather than the sizeof syntax.<br>
> <br>
> Modified:<br>
>      cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td<br>
>      cfe/trunk/include/clang/Sema/Sema.h<br>
>      cfe/trunk/lib/Sema/SemaExpr.cpp<br>
>      cfe/trunk/lib/Sema/SemaExprCXX.cpp<br>
>      cfe/trunk/test/SemaCXX/deprecated.cpp<br>
>      cfe/trunk/www/cxx_status.html<br>
<br>
Oh, I should probably have commented here on the mailing list rather <br>
than at <br>
<<a href="https://github.com/llvm/llvm-project/commit/4a6861a7e5b59be24a09b8b9782255d028e7aade#commitcomment-35540755" rel="noreferrer noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/4a6861a7e5b59be24a09b8b9782255d028e7aade#commitcomment-35540755</a>>:<br>
<br>
I assume the scenario at <br>
<<a href="https://gitlab.gnome.org/GNOME/glib/merge_requests/1170" rel="noreferrer noreferrer" target="_blank">https://gitlab.gnome.org/GNOME/glib/merge_requests/1170</a>> "Avoid C++20 <br>
deprecated assignment to volatile",<br>
<br>
   (void) (0 ? *(location) = (result) : 0);<br>
<br>
where *(location) is of (non-class) volatile type, is a true positive <br>
that we indeed want to warn about?<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Yes, that case is deprecated in C++20.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank" rel="noreferrer">cfe-commits@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
</blockquote></div></div></div>