This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] fix inaccurate g++ diagnostic text
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 2 Jun 2010 15:01:35 -0500
- Subject: Re: [patch] fix inaccurate g++ diagnostic text
- References: <AANLkTin50n6ilW3e-1v8MrMBLmeHSRrhk5OuKhweyMx-@mail.gmail.com>
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.