This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH,RFC] Change __convert_from_v to use snprintf and use it


Paolo Carlini wrote:

> Hi,
>
> I went ahead and implemented what I presented in my previous message.
>
> Indeed, it seems to me that using snprintf, allows for a /much/ cleaner allocation of the
> memory required for the various staging buffers.

I have just learned :-( that snprintf is only part of C99, not of C89, despite being quite
widespread. Therefore, we cannot assume it to be available on systems using glibc2.0.x or
whatever not C99 compliant.

This is really too bad, since I think that using snprintf both greatly clean up the code and
reduces dramatically the memory used at run time when allocating the staging buffers.

I don't know if we can deal in some way with this problem, perhaps with libiberty or
whatever. Otherwise, forget about my later proposal and consider only the much more limited
fix for money_put::do_put of yesterday:

    http://gcc.gnu.org/ml/libstdc++/2002-03/msg00274.html

Ciao,
Paolo.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]