This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] fix inaccurate g++ diagnostic text


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]