PR c++/34758 Bad diagnostic for circular dependency in constructor default argument

Manuel López-Ibáñez lopezibanez@gmail.com
Wed Feb 11 13:53:00 GMT 2009


Bootstrapped and regression tested on x86_64-unknown-linux-gnu with
--enable-languages=all,ada

OK for trunk?

2009-02-11  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>

	PR c++/34758
cp/
	* call.c (convert_default_argument): Clarify error message.
testsuite/
	* g++.dg/parse/pr34758.C: New.



2009/2/9 Mark Mitchell <mark@codesourcery.com>:
> Manuel López-Ibáñez wrote:
>
>>> Why is it worth having two messages?  The people reading the messages
>>> are programmers; they'll understand that saying "argument 1" for a
>>> 1-argument function is just a computer being a bit redundant.
>>
>> I do not have the particular mail discussion at hand, but this was
>> explicitly requested there. I think it is nice, and I already took
>> that trouble to implement it. But if it is such a problem, then I
>> guess it can be de-implemented.
>
> I think it's overkill.
>
>> I do not see that convert_for_initialization documents parmnum
>> anywhere. The 0-based was already there, I haven't changed it.
>>
>> BTW, convert_for_initialization uses %P to print parmnum, whereas the
>> original code in convert_default_arg is using %d, so that may be the
>> reason why it does not use parmnum+1.
>
> OK, so then lets use %P in both places.
>
> Thanks,
>
> --
> Mark Mitchell
> CodeSourcery
> mark@codesourcery.com
> (650) 331-3385 x713
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-pr34758.diff
Type: text/x-diff
Size: 2343 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20090211/34df718f/attachment.bin>


More information about the Gcc-patches mailing list