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/callfuncs.c | |
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/callfuncs.c')
-rw-r--r-- | gdb/testsuite/gdb.base/callfuncs.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/callfuncs.c b/gdb/testsuite/gdb.base/callfuncs.c index b4ab7d5..7fb5061 100644 --- a/gdb/testsuite/gdb.base/callfuncs.c +++ b/gdb/testsuite/gdb.base/callfuncs.c @@ -641,6 +641,13 @@ struct struct_with_fnptr function_struct = { doubleit }; struct struct_with_fnptr *function_struct_ptr = &function_struct; +int * +voidfunc (void) +{ + static int twentythree = 23; + return &twentythree; +} + /* Gotta have a main to be able to generate a linked, runnable executable, and also provide a useful place to set a breakpoint. */ |