Re: static const int optimization fails in conditional expressions

2001-12-11 Thread James E Jurach Jr.
> Compilers are allowed to optimize static const integral members, in the > sense that their values may be used directly. Right. I'm reporting that 1) gcc's behavior changed in this regard in 2.96 and 3.00 from 2.95 and previous, and 2) gcc sometimes uses these values directly without defini

Re: static const int optimization fails in conditional expressions

2001-12-11 Thread James E Jurach Jr.
> On Tue, Dec 11, 2001 at 05:06:31PM -0600, James Jurach wrote: > > When class members declared as static const int appear in conditional > > expressions, they are not properly optimized out. The compiler treats them > > as undefined variables, rather than integer literals. > > That's because they