summaryrefslogtreecommitdiff
path: root/gdb
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
commit4ba6d70971c4a30686f1f7d2c9d9df90f931ec5b (patch)
tree30d3de5858bec980035982e469b9ace642179649 /gdb
parent10301df635538e6dda1a43c50df8b21e2f61aed7 (diff)
downloadgdb-4ba6d70971c4a30686f1f7d2c9d9df90f931ec5b.tar.gz
* 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')
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/c-typeprint.c4
2 files changed, 9 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 27a4fcf77e4..e469f4c3c64 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2002-02-08 Jim Blandy <jimb@redhat.com>
+
+ * c-typeprint.c (c_type_print_varspec_suffix): If a function type
+ is prototyped and has no arguments, print its argument list as
+ `(void)'.
+
2002-02-08 Chris Demetriou <cgd@broadcom.com>
* MAINTAINERS (write-after-approval): Add myself.
diff --git a/gdb/c-typeprint.c b/gdb/c-typeprint.c
index e2a99451df3..0c460e9dd5f 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");
}