search for: cwg453

Displaying 2 results from an estimated 2 matches for "cwg453".

Did you mean: cw1403
2018 Jul 12
2
[RFC] A nofree (and nosynch) function attribute: Mixing dereferenceable and delete
...lies that, perhaps surprisingly, the same holds > here. When the argument to f is initialized, it must refer to a valid > object (even if the initializer is another reference). > > Richard, what do you think? > > > First, see also core issue 453 <http://wg21.link/cwg453>, under the > guise of which we're fixing the wording in [dcl.ref](9.2.3.2)p5 from > >   "A reference shall be initialized to refer to a valid object or > function." > > to something like > >   "If an lvalue to which a reference is directly bound design...
2018 Jul 11
3
[RFC] A nofree (and nosynch) function attribute: Mixing dereferenceable and delete
[+Richard] On 07/11/2018 08:29 AM, Sanjoy Das wrote: > I'm not sure if nosynch is sufficient. What if we had: > > void f(int& x) { > if (false) { > int r0 = x; > } > } > > // other thread > free(<pointer to x>); > > The source program is race free, but LLVM may speculate the read from > x (seeing that it is dereferenceable) creating a