From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21578 invoked by alias); 9 Feb 2002 16:11:07 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 21489 invoked from network); 9 Feb 2002 16:11:05 -0000 Received: from unknown (HELO zwingli.cygnus.com) (208.245.165.35) by sources.redhat.com with SMTP; 9 Feb 2002 16:11:05 -0000 Received: by zwingli.cygnus.com (Postfix, from userid 442) id 954475E9DE; Sat, 9 Feb 2002 11:12:36 -0500 (EST) To: gdb-patches@sources.redhat.com Subject: Re: RFA: print prototyped function types with no arguments correctly References: <20020209070110.C378B5E9DE@zwingli.cygnus.com> From: Jim Blandy Date: Sat, 09 Feb 2002 08:11:00 -0000 In-Reply-To: <20020209070110.C378B5E9DE@zwingli.cygnus.com> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-02/txt/msg00266.txt.bz2 No regressions, so I've committed this. Jim Blandy writes: > Pretty obvious. I'm just waiting to re-run the test suite before I > commit this. > > 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)'. > > 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"); > }