num_get<>::do_get patch (fixed version)

Branko Cibej
Tue Jun 1 12:43:00 GMT 1999

Benjamin Kosnik wrote:

> Ryzard,
> You need to do an initialization for the string literal, not an
> assignment.
>         const char __conv[] = "%ho";
> should work.

Why should he have to do that? He declares a pointer to a const char (array):

     const char* __conv;

and later assigns the address of a const char (array) to it:

     __conv = "%ho";

That's well formed. There is no need to name the strings, and the pointer
itself is not const, so he can assign to it as many times as he likes. I see
nothing wrong with the patch in that regard.

Branko Čibej                 <>
HERMES SoftLab, Litijska 51, 1000 Ljubljana, Slovenia
voice: (+386 61) 186 53 49   fax: (+386 61) 186 52 70

More information about the Libstdc++ mailing list