Parameter pack in non-last position in function formal parameter list?

Avi Kivity
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
>>  ./ note:   candidate expects 1 
>> argument, 4 provided
>> it might say,
>>   ./ note:   candidate expects 1 
>> argument, 4 provided
>> ./ 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