This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
Re: num_get<>::do_get patch (fixed version)
- To: Benjamin Kosnik <bkoz@cygnus.com>
- Subject: Re: num_get<>::do_get patch (fixed version)
- From: Branko Cibej <branko.cibej@hermes.si>
- Date: Wed, 28 Apr 1999 15:01:44 +0200
- CC: kabatek@chemie.uni-halle.de, libstdc++@sourceware.cygnus.com
- Organization: HERMES SoftLab
- References: <Pine.LNX.3.96.990423194108.15535D-100000@happy.cygnus.com>
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 <branko.cibej@hermes.si>
HERMES SoftLab, Litijska 51, 1000 Ljubljana, Slovenia
voice: (+386 61) 186 53 49 fax: (+386 61) 186 52 70