diff options
author | Tom Tromey <tromey@redhat.com> | 2012-07-09 14:20:52 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2012-07-09 14:20:52 +0000 |
commit | e314d62968dfb4ae82c70dbe68d9d4ec929deb7e (patch) | |
tree | b66865521e10da3ab58c11932c46a5715cf499af /gdb/testsuite/gdb.base/whatis.exp | |
parent | 1416057852c2649d2c3d0636b4e6007f3bc2d043 (diff) | |
download | gdb-e314d62968dfb4ae82c70dbe68d9d4ec929deb7e.zip gdb-e314d62968dfb4ae82c70dbe68d9d4ec929deb7e.tar.gz gdb-e314d62968dfb4ae82c70dbe68d9d4ec929deb7e.tar.bz2 |
* c-exp.y (check_parameter_typelist): New function.
(parameter_typelist): Call it.
* eval.c (make_params): Handle '(void)' case.
* gdbtypes.c (lookup_function_type_with_arguments): Handle
'(void)' case.
testsuite
* gdb.base/whatis.exp: Add error checks for improper 'void' uses.
* gdb.base/callfuncs.exp: Add cast-based test.
* gdb.base/callfuncs.c (voidfunc): New function.
Diffstat (limited to 'gdb/testsuite/gdb.base/whatis.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/whatis.exp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/whatis.exp b/gdb/testsuite/gdb.base/whatis.exp index 9365485..18edc4c 100644 --- a/gdb/testsuite/gdb.base/whatis.exp +++ b/gdb/testsuite/gdb.base/whatis.exp @@ -499,3 +499,11 @@ gdb_test "whatis int (*)(int, 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" + +gdb_test "whatis int (*)(void, int, int)" \ + "parameter types following 'void'" \ + "whatis applied to function with types trailing 'void'" + +gdb_test "whatis int (*)(int, void, int)" \ + "'void' invalid as parameter type" \ + "whatis applied to function with 'void' parameter type" |