From: Jim Blandy <jimb@zwingli.cygnus.com>
To: gdb-patches@sources.redhat.com
Subject: Re: RFA: print prototyped function types with no arguments correctly
Date: Sat, 09 Feb 2002 08:11:00 -0000 [thread overview]
Message-ID: <npr8nud47g.fsf@zwingli.cygnus.com> (raw)
In-Reply-To: <20020209070110.C378B5E9DE@zwingli.cygnus.com>
No regressions, so I've committed this.
Jim Blandy <jimb@cygnus.com> writes:
> Pretty obvious. I'm just waiting to re-run the test suite before I
> commit this.
>
> 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)'.
>
> Index: gdb/c-typeprint.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/c-typeprint.c,v
> retrieving revision 1.17
> diff -c -r1.17 c-typeprint.c
> *** gdb/c-typeprint.c 2002/01/20 19:42:04 1.17
> --- gdb/c-typeprint.c 2002/02/09 06:54:28
> ***************
> *** 576,582 ****
> {
> int i, len = TYPE_NFIELDS (type);
> fprintf_filtered (stream, "(");
> ! if ((len == 0) && (current_language->la_language == language_cplus))
> {
> fprintf_filtered (stream, "void");
> }
> --- 576,584 ----
> {
> int i, len = TYPE_NFIELDS (type);
> fprintf_filtered (stream, "(");
> ! if (len == 0
> ! && (TYPE_PROTOTYPED (type)
> ! || current_language->la_language == language_cplus))
> {
> fprintf_filtered (stream, "void");
> }
prev parent reply other threads:[~2002-02-09 16:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-08 22:59 Jim Blandy
2002-02-09 8:11 ` Jim Blandy [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=npr8nud47g.fsf@zwingli.cygnus.com \
--to=jimb@zwingli.cygnus.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox