While I hope someone eventually comes up w/ better wording, I think this is
an improvement. LGTM.


On Fri, Aug 17, 2012 at 6:56 AM, Hans Wennborg <[email protected]> wrote:

> On Fri, Aug 17, 2012 at 12:10 PM, Chandler Carruth <[email protected]>
> wrote:
> >> +namespace references {
> >> +  int &a = a; // expected-warning{{variable 'a' is uninitialized when
> >> used within its own initialization}}
> >
> > While completely correct (we are initializing the reference to an
> > uninitialized reference), I wonder if this will confuse people into
> thinking
> > there is some kind of copy or uninitialized *value* underlying the
> > reference... Is there a better / more clear / more specific warning text
> we
> > can use here?
> >
> > "reference 'a' not yet been bound to a value when used within its own
> > initialization"?
> > "reference 'a' is unbound when used within its own initialization"?
>
> I like your first suggestion and think it does make the warning
> clearer. It annoys me slightly that we'd have to special-case
> references when we output the diagnostic (it would look like in the
> attached patch), but maybe that's not a big deal.
>
> Thanks,
> Hans
>
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to