This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, C++] Fix pr43779
- From: Manuel López-Ibáñez <lopezibanez at gmail dot com>
- To: Shujing Zhao <pearly dot zhao at oracle dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Gabriel Dos Reis <gdr at integrable-solutions dot net>, Paolo Carlini <paolo dot carlini at oracle dot com>
- Date: Wed, 28 Apr 2010 12:48:11 +0200
- Subject: Re: [PATCH, C++] Fix pr43779
- References: <4BD8076E.7090505@oracle.com>
On 28 April 2010 12:01, Shujing Zhao <pearly.zhao@oracle.com> wrote:
> Hi,
>
> This patch fixed pr43779 that emits the diagnostic for easy translation.
> Tested on i686-pc-linux-gnu with no regression. OK for trunk?
> Since it is reported for 4.5.0, should gcc-4_5-branch be fixed too?
Being picky, a static function that abstracts out this code with a
boolean for fewer/too many will be shorter (check the boolean last to
choose the appropriate string), and make the original function shorter
as well.
error_at (input_location,
(too_many_p)
? _("too many arguments to constructor %q#D")
: _("too few arguments to constructor %q#D"),
fndecl);
Cheers,
Manuel.