* RFA: print prototyped function types with no arguments correctly
@ 2002-02-08 22:59 Jim Blandy
2002-02-09 8:11 ` Jim Blandy
0 siblings, 1 reply; 2+ messages in thread
From: Jim Blandy @ 2002-02-08 22:59 UTC (permalink / raw)
To: gdb-patches
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");
}
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: RFA: print prototyped function types with no arguments correctly
2002-02-08 22:59 RFA: print prototyped function types with no arguments correctly Jim Blandy
@ 2002-02-09 8:11 ` Jim Blandy
0 siblings, 0 replies; 2+ messages in thread
From: Jim Blandy @ 2002-02-09 8:11 UTC (permalink / raw)
To: gdb-patches
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");
> }
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-02-09 16:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-08 22:59 RFA: print prototyped function types with no arguments correctly Jim Blandy
2002-02-09 8:11 ` Jim Blandy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox