Re: String constification

2004-04-26 Thread Francois Gouget
On Mon, 26 Apr 2004, Alexandre Julliard wrote: [...] > The first case is not a const pointer, it's a pointer to a const > string, and it requires the compiler to allocate separate (writable) > storage for the pointer, so you are wasting 4 bytes per string. You > could use 'const char * const' to at

Re: String constification

2004-04-26 Thread Alexandre Julliard
Francois Gouget <[EMAIL PROTECTED]> writes: > On Sat, 24 Apr 2004, Dmitry Timoshkov wrote: > >> "Francois Gouget" <[EMAIL PROTECTED]> wrote: >> >> > We find the same issues with an added twist: now that we can use >> > literals we can write things like: >> > >> >const char* str = "String liter

Re: String constification

2004-04-24 Thread Francois Gouget
On Sat, 24 Apr 2004, Dmitry Timoshkov wrote: > "Francois Gouget" <[EMAIL PROTECTED]> wrote: > > > We find the same issues with an added twist: now that we can use > > literals we can write things like: > > > >const char* str = "String literal"; > > > > However this is slightly different from:

Re: String constification

2004-04-24 Thread Francois Gouget
On Sat, 24 Apr 2004, Dimitrie O. Paun wrote: > On April 24, 2004 10:30 am, Dmitry Timoshkov wrote: > > I prefer to not rely on a compiler's good will. > > To be honest, I don't much see the point of this patch myself. Maybe the text at the beginning made it look like this is just about 'const cha

Re: String constification

2004-04-24 Thread Dimitrie O. Paun
On April 24, 2004 10:30 am, Dmitry Timoshkov wrote: > I prefer to not rely on a compiler's good will. To be honest, I don't much see the point of this patch myself. If you want to look at the constantness of strings, there was an effort back in Oct 2003 by Daniel Marmier to fix things up so that w

Re: String constification

2004-04-24 Thread Dmitry Timoshkov
"Francois Gouget" <[EMAIL PROTECTED]> wrote: > We find the same issues with an added twist: now that we can use > literals we can write things like: > >const char* str = "String literal"; > > However this is slightly different from: > >static const char* str[] = "String literal"; > > T