From a6fb9c08a9ac65df98ca8829f43083feda19a6fe Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 6 Jul 2012 14:48:48 +0000 Subject: * c-exp.y (DOTDOTDOT): New token. (func_mod, exp): Use parameter_typelist. (parameter_typelist): New production. (tokentab3): Add "..." token. * eval.c (make_params): Handle varargs. * gdbtypes.c (lookup_function_type_with_arguments): Handle varargs. testsuite * gdb.base/whatis.exp: Add test. --- gdb/testsuite/gdb.base/whatis.exp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gdb/testsuite/gdb.base/whatis.exp') diff --git a/gdb/testsuite/gdb.base/whatis.exp b/gdb/testsuite/gdb.base/whatis.exp index 336901d..9365485 100644 --- a/gdb/testsuite/gdb.base/whatis.exp +++ b/gdb/testsuite/gdb.base/whatis.exp @@ -495,3 +495,7 @@ gdb_test "whatis char (*(*)())\[23\]" \ gdb_test "whatis int (*)(int, int)" \ "type = int \\(\\*\\)\\(int, int\\)" \ "whatis applied to pointer to function taking int,int and returning int" + +gdb_test "whatis int (*)(const int *, ...)" \ + "type = int \\(\\*\\)\\(const int \\*, \\.\\.\\.\\)" \ + "whatis applied to pointer to function taking const int ptr and varargs and returning int" -- cgit v1.1