Parameter pack in non-last position in function formal parameter list?
Avi Kivity
avi@cloudius-systems.com
Fri Jun 19 17:01:00 GMT 2015
On 06/19/2015 07:50 PM, Marc Glisse wrote:
> On Fri, 19 Jun 2015, Avi Kivity wrote:
>
>> I wonder if gcc can give a better diagnostic here. Instead of
>>
>> ./variadic-function-nonlast.cc:9:15: note: candidate expects 1
>> argument, 4 provided
>>
>> it might say,
>>
>> ./variadic-function-nonlast.cc:9:15: note: candidate expects 1
>> argument, 4 provided
>> ./variadic-function-nonlast.cc:9:15: note: parameter pack `X' in
>> non-last position deduced as empty parameter pack
>
> I have no idea how hard that would be, but it could make sense. Feel
> free to file an enhancement PR on gcc's bugzilla. Do describe
> precisely the feature you are asking for. Also, it would help if you
> could add to that report the error messages from other compilers, for
> inspiration.
>
Deducing 'clang' for 'other compilers', I find that its error message is
no better. I'll file a report.
More information about the Gcc-help
mailing list