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, C++] Fix pr43779


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.


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