[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] printf: remove stupid restriction on %n
From: |
Paul Eggert |
Subject: |
Re: [PATCH] printf: remove stupid restriction on %n |
Date: |
Sun, 09 Sep 2012 18:28:15 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:15.0) Gecko/20120827 Thunderbird/15.0 |
On 09/09/2012 09:01 AM, Bruno Haible wrote:
> Andreas, we have to be clear what API gnulib should offer.
> (a) the ability to use %n in every format string, or
> (b) the ability to use %n in read-only format strings only, and
> reject them on writable format strings.
Another option is
(c) the ability to use %n in read-only format strings only
i.e., with undefined behavior if programs attempt to use %n
in writable strings. As I understand it, this is the patch that
Andreas submitted. If we take this approach, then we still
need to do your steps 1 (gain agreement) and 2 (document the
change), but we wouldn't need to do step 3 (reject uses of
%n in writable memory), which would be less work.