On 13 Mar 1999, Lars Gullik Bjønnes wrote:
> >> Allan Rae writes:
>
> AR> On 12 Mar 1999, Lars Gullik Bjønnes wrote:
> >> The patch looks ok to me. Are you sure that the temporary will
> >> stay around until TestInvariant() goes out of scope?
>
> AR> I was curious about this myself when I was writing the code so I
> AR> tested it (only on egcs-1.1.1 mind you) by adding a few extra
> AR> printf statements at appropriate points. The temporary variable
> AR> always stays around until the very end, at least with -O, I
> AR> didn't try higher levels of optimisation because they aren't
> AR> usually used during development.
>
> Could you test with higher optimisation too?
Done. Now a much revised patch is attached. This direct against latest
cvs and includes a couple of other fixes I had to do to get LyX running or
compiling. Two "no nulls allowed" fixes and a definition for LChar so
Asgers Encoding* would compile.
This time I use a #define to get a named variable rather than a temp.
The temp was disappearing too early otherwise as you suspected.
Allan. (ARRae)
revised LString Invariant Testing