From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23095 invoked by alias); 21 Jun 2002 14:13:46 -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 23074 invoked from network); 21 Jun 2002 14:13:44 -0000 Received: from unknown (HELO localhost.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 21 Jun 2002 14:13:44 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 4B92D3E63; Fri, 21 Jun 2002 10:13:44 -0400 (EDT) Message-ID: <3D133498.1020708@cygnus.com> Date: Fri, 21 Jun 2002 07:13:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.0) Gecko/20020613 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Pierre Muller Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] remove calls to fprintf in language parsers References: <4.2.0.58.20020620114119.01fb8ea8@ics.u-strasbg.fr> <4.2.0.58.20020621090032.00a45ed8@ics.u-strasbg.fr> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-SW-Source: 2002-06/txt/msg00418.txt.bz2 > At 02:49 21/06/2002 , Andrew Cagney a écrit: > >>>+/* Function used to avoid direct calls to fprintf >>>+ in the code generated by the bison parser. */ >>>+ >>>+extern void parser_fprintf (FILE *, const char *, ...); > >> >>Hmm, wonder if there is any benefit in adding ATTR_FORMAT(printf, 2, 3) to the declaration? > > > I didn't even know this modifier :( BTW, attr_format was only added to error() (one of GDBs most important functions) a month or so ago. While the attribute has been around for a while, it is relativly new for GDB. > But it does look appropriate indeed. My only reservation was that bison/yacc could turn out to generate badly formatted printf statements. However, if that is happening then we need to know anyway. As for indentation. GNU indent doesn't handle ATTR_FORMAT() very well so any location is likely ok. >>Anyway, yes, > > > Does this mean I can apply the patch? Yes, either way. Andrew (I'm just happy to see these fprintf() slowly disappearing :-)