[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: RFC, problem with g++4

On 7/29/05, Antti-Juhani Kaijanaho <ajk@debian.org> wrote:
> On 20050729T163333+0200, Olaf van der Spek wrote:
> > On 7/29/05, Goswin von Brederlow <brederlo@informatik.uni-tuebingen.de> wrote:
> > > Florian Weimer <fw@deneb.enyo.de> writes:
> > > Doesn't that still make N a real variable in memory and does not get
> > > optimized away like enums?
> >
> > I think it's (only) required to have an address.
> > I don't see why the compiler can't optimize it away (if it's const).
> Only if the compiler knows all uses of that constant.   With dynamic
> linking, you can't know that very easily.

I thought you meant optimizing code that accesses it for performance.
I don't think the space optimization is important.

Reply to: