This is the mail archive of the gcc-help@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: Parameter pack in non-last position in function formal parameter list?


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.


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