This is the mail archive of the
mailing list for the GCC project.
Re: [C++ PATCH] PR c++/79133
- From: Paolo Carlini <paolo dot carlini at oracle dot com>
- To: Ville Voutilainen <ville dot voutilainen at gmail dot com>, gcc-patches List <gcc-patches at gcc dot gnu dot org>, Jason Merrill <jason at redhat dot com>, Nathan Sidwell <nathan at acm dot org>
- Date: Sat, 7 Jul 2018 20:12:17 +0200
- Subject: Re: [C++ PATCH] PR c++/79133
- References: <CAFk2RUY6GAaErLo-joHP+UWkQwCSFM5zwa5p5WoyQd419BrKsQ@mail.gmail.com>
On 07/07/2018 01:50, Ville Voutilainen wrote:
Should we really print the same name twice? Looks like we don't have
available (yet) a location for cap - that would likely enable fancy
things - but in that case too I don't think the user would find that
interesting seeing the same name twice. Also, we are using %E, thus we
are pretty printing expressions - which in general we don't want to do -
I see that in the case of cap it gives pretty obfuscated results for the
last two tests (what the heck is __lambda3?!?). So, all in all, maybe
print the name once, as parms, or something like that, for the time
being? Or try to avoid %E altogether?
+ error_at (DECL_SOURCE_LOCATION (parms),
+ "capture %qE and lambda parameter %qE "
+ "have the same name",
+ cap, parms);