This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFA: print prototyped function types with no arguments correctly



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");
>   	    }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]