C++ Logo

sg12

Advanced search

Re: [ub] Proposal: make self-initialized references ill-formed (C++17?)

From: Jim Gimpel <jim.gimpel_at_[hidden]>
Date: Mon, 22 Sep 2014 12:12:25 -0400
I tried this with my favorite static analyzer (FlexeLint) and it issued a
Warning.

Jim Gimpel

On Mon, Sep 22, 2014 at 8:15 AM, John Zwinck <jzwinck_at_[hidden]> wrote:

> On Sun Sep 21 14:27:43 CEST 2014, Jens Maurer wrote:
> > On 09/18/2014 09:42 PM, Richard Smith wrote:
> > > FYI, this is core issue 504:
> > >
> > > http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#504
> >
> > ... which doesn't necessarily mean it will be automatically addressed by
> CWG
> > in the near future.
> >
> > Feel free to write a short paper suggesting specific wording changes to
> address
> > this issue. (Or, if just 1-2 sentence, send your wording changes to
> Mike Miller
> > if you won't attend WG21 meetings in person.)
>
> Understood. I will write some proposed wording here in the hope that
> someone might give feedback. In [dcl.init.ref] I would add a clause:
>
> ---
> The initializer shall not mention the reference being initialized.
> Any use of a reference which has not yet been initialized is
> ill-formed.
> ---
>
> I currently have no plans to attend WG21 meetings, but appreciate
> your time here.
>
> John Zwinck
> _______________________________________________
> ub mailing list
> ub_at_[hidden]
> http://www.open-std.org/mailman/listinfo/ub
>

Received on 2014-09-22 18:12:28