From: Jim Blandy Date: Sat, 9 Feb 2002 16:08:53 +0000 (+0000) Subject: * c-typeprint.c (c_type_print_varspec_suffix): If a function type X-Git-Tag: binutils-2_12-branchpoint~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bdc2fc72b3e21f67ce8b5eae4720429989e1c7fc;p=platform%2Fupstream%2Fbinutils.git * c-typeprint.c (c_type_print_varspec_suffix): If a function type is prototyped and has no arguments, print its argument list as `(void)'. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 27a4fcf..e469f4c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2002-02-08 Jim Blandy + + * 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 * MAINTAINERS (write-after-approval): Add myself. diff --git a/gdb/c-typeprint.c b/gdb/c-typeprint.c index e2a9945..0c460e9 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"); }