From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14767 invoked by alias); 9 Feb 2002 06:59:38 -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 14653 invoked from network); 9 Feb 2002 06:59:35 -0000 Received: from unknown (HELO zwingli.cygnus.com) (208.245.165.35) by sources.redhat.com with SMTP; 9 Feb 2002 06:59:35 -0000 Received: by zwingli.cygnus.com (Postfix, from userid 442) id C378B5E9DE; Sat, 9 Feb 2002 02:01:10 -0500 (EST) From: Jim Blandy To: gdb-patches@sources.redhat.com Subject: RFA: print prototyped function types with no arguments correctly Message-Id: <20020209070110.C378B5E9DE@zwingli.cygnus.com> Date: Fri, 08 Feb 2002 22:59:00 -0000 X-SW-Source: 2002-02/txt/msg00262.txt.bz2 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"); }