[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: working with "good enough" functions
From: |
Bruno Haible |
Subject: |
Re: working with "good enough" functions |
Date: |
Sat, 17 Jan 2009 21:34:39 +0100 |
User-agent: |
KMail/1.9.9 |
Mike Frysinger and Simon Josefsson wrote:
> >> If this happens often enough, perhaps gnulib should have a
> >> printf-posix-no-fp module that does what you want?
> >
> > i would certainly use it, but if i'm the only one expressing interest thus
> > far, then maybe it isnt a hot issue.
>
> I see that some *printf objects from gnulib are linked into builds even
> on glibc platforms. If that would be fixed by using a module
> printf-posix-no-fp, I would use it. (My projects rarely use
> float/double.)
But "rarely" does not mean "never". The point of the gnulib substitutes is
that you can use %zd, %f, etc. in your format strings and don't need to
worry about platforms or compatibility.
If someone is to introduce yet another variant *iprintf for format strings
that contain only integer/pointer/character/string directives and no
floating-point directives, then it reduces the reliability of your program:
If you happen to use %f in such a place nevertheless, the compiler will not
be able to warn you. (GCC supports an attribute __printf__ but none for
__iprintf__.)
I would let things lie as they are: Nowadays, executable size is not critical
any more.
Bruno
- working with "good enough" functions, Mike Frysinger, 2009/01/04
- Re: working with "good enough" functions, Jim Meyering, 2009/01/04
- Re: working with "good enough" functions, Paolo Bonzini, 2009/01/05
- Re: working with "good enough" functions, Mike Frysinger, 2009/01/05
- Re: working with "good enough" functions, Paul Eggert, 2009/01/08
- Re: working with "good enough" functions, Eric Blake, 2009/01/08
- Re: working with "good enough" functions, Mike Frysinger, 2009/01/08
- Re: working with "good enough" functions, Simon Josefsson, 2009/01/08
- Re: working with "good enough" functions, Mike Frysinger, 2009/01/08
- Re: working with "good enough" functions,
Bruno Haible <=
- Re: working with "good enough" functions, Mike Frysinger, 2009/01/18
- Re: working with "good enough" functions, Simon Josefsson, 2009/01/18