bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: working with "good enough" functions


From: Mike Frysinger
Subject: Re: working with "good enough" functions
Date: Sun, 18 Jan 2009 00:30:53 -0500
User-agent: KMail/1.10.3 (Linux/2.6.28; KDE/4.1.3; x86_64; ; )

On Saturday 17 January 2009 15:34:39 Bruno Haible wrote:
> 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__.)

gnulib isnt there to protect the developer from doing something wrong.  it's 
there to provide a sane (according to the needs of the developer) environment.

> I would let things lie as they are: Nowadays, executable size is not
> critical any more.

tell that to the embedded developer
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]