[patch] fix inaccurate g++ diagnostic text

NightStrike nightstrike@gmail.com
Mon Jun 7 16:29:00 GMT 2010


On Wed, Jun 2, 2010 at 6:20 PM, Gabriel Dos Reis
<gdr@integrable-solutions.net> wrote:
> On Wed, Jun 2, 2010 at 4:25 PM, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
>> On 2 June 2010 21:01, Gabriel Dos Reis <gdr@integrable-solutions.net> wrote:
>>> On Wed, Jun 2, 2010 at 2:56 PM, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
>>>> Given:
>>>>
>>>> struct S {
>>>>  int i;
>>>>  void f() : i(0) { }
>>>> };
>>>>
>>>> we get the error "only constructors take base initializers" which
>>>> implies that all mem-initializers are for base classes, but as in this
>>>> case they can be for members, and indeed the standard grammar refers
>>>> to them as mem-initializers.
>>>>
>>>> This patch changes the diagnostic to refer to an initializer list,
>>>> rather than base (or member) initializers.
>>>
>>> An 'initializer list' now means something different in C++0x.
>>> I would suggest: "member initializer" for this case.
>>>
>>
>> Good point.  My first thought was to simply change s/base/member/ but
>> I decided that didn't cover the case of base initializers.  However,
>> as the standard's term is mem-initializer I agree "member
>> initializers" is better.
>>
>> Updated patch, tested x86_64/Linux again, ok for trunk?
>
> yes, thanks.
> -- Gaby
>

Was this committed yet?



More information about the Gcc-patches mailing list