This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: There can be only one version_string
> From: Zack Weinberg <zack@codesourcery.com>
>
> On Fri, Sep 20, 2002 at 06:31:37PM -0400, Kaveh R. Ghazi wrote:
> > > From: Zack Weinberg
> > >
> > > I needed to change version_string from const char *const to const char[]
> > > to make the Ada stuff work; this is also marginally more memory
> > > efficient.
> >
> > How is const char[] more memory efficient than const char *const ?
>
> const char[] is just the string; const char *const is the string and a
> read-only pointer to that string.
> zw
Hmm, I thought gcc optimized the latter into the former. Or maybe
only with automatic variables? I could be wrong...
--
Kaveh R. Ghazi ghazi@caip.rutgers.edu