summaryrefslogtreecommitdiffstats
path: root/gdb/c-typeprint.c
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2002-02-09 16:08:53 +0000
committerJim Blandy <jimb@codesourcery.com>2002-02-09 16:08:53 +0000
commitbdc2fc72b3e21f67ce8b5eae4720429989e1c7fc (patch)
tree0cccb2361dd61d725f12b6fc193d52c9ca36764c /gdb/c-typeprint.c
parent51124b6cb9ef84fb287d8e787b72da5b89f7c760 (diff)
downloadppe42-binutils-bdc2fc72b3e21f67ce8b5eae4720429989e1c7fc.tar.gz
ppe42-binutils-bdc2fc72b3e21f67ce8b5eae4720429989e1c7fc.zip
* c-typeprint.c (c_type_print_varspec_suffix): If a function type
is prototyped and has no arguments, print its argument list as `(void)'.
Diffstat (limited to 'gdb/c-typeprint.c')
-rw-r--r--gdb/c-typeprint.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/c-typeprint.c b/gdb/c-typeprint.c
index e2a99451df..0c460e9dd5 100644
--- a/gdb/c-typeprint.c
+++ b/gdb/c-typeprint.c
@@ -576,7 +576,9 @@ c_type_print_varspec_suffix (struct type *type, struct ui_file *stream,
{
int i, len = TYPE_NFIELDS (type);
fprintf_filtered (stream, "(");
- if ((len == 0) && (current_language->la_language == language_cplus))
+ if (len == 0
+ && (TYPE_PROTOTYPED (type)
+ || current_language->la_language == language_cplus))
{
fprintf_filtered (stream, "void");
}
OpenPOWER on IntegriCloud