[PATCH] D59307: Patch llvm bug 41033 concerning atomicity of statement expressions

Melanie Blower via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 13 11:21:29 PDT 2019


mibintc added a comment.

In D59307#1427663 <https://reviews.llvm.org/D59307#1427663>, @jfb wrote:

> Thinking some more, this is really a silly gotcha in code. We should probably follow what we're about to do with wg21.link/P1152 <https://reviews.llvm.org/P1152> and ban chaining. Statement expressions should therefore not be allowed to return `_Atomic`, `std::atomic`, nor `volatile`.


If the atomic load which is the value of the StmtExpr drops the atomic attribute then this would trivially be true, and there would be no need to add a restriction. According to what Clark says, once the value is loaded it's just data.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59307/new/

https://reviews.llvm.org/D59307





More information about the cfe-commits mailing list