This is the mail archive of the libstdc++@sourceware.cygnus.com mailing list for the libstdc++ project. See the libstdc++ home page for more information.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
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