Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@cygnus.com>
To: Pierre Muller <muller@cerbere.u-strasbg.fr>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] remove calls to fprintf in language parsers
Date: Fri, 21 Jun 2002 07:13:00 -0000	[thread overview]
Message-ID: <3D133498.1020708@cygnus.com> (raw)
In-Reply-To: <4.2.0.58.20020621090032.00a45ed8@ics.u-strasbg.fr>

> 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 :-)



  reply	other threads:[~2002-06-21 14:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-20  2:44 Pierre Muller
2002-06-20 17:49 ` Andrew Cagney
2002-06-21  0:52   ` Pierre Muller
2002-06-21  7:13     ` Andrew Cagney [this message]
2002-06-21  7:40       ` Pierre Muller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3D133498.1020708@cygnus.com \
    --to=ac131313@cygnus.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=muller@cerbere.u-strasbg.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox