[Top][All Lists]

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

Re: bug report

From: Kevin Ryde
Subject: Re: bug report
Date: 20 Mar 2001 07:49:37 +1000
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.5

address@hidden writes:
> //Here, as simply as I can put it, is a bug (?) having to do with
> //trying to set an mpf_t (which is a member of a class) inside a
> //subroutine:  The notes are contained in cout statements (so that 
> //the notes will appear on the screen if the code below is compiled
> //and run).

Your zfcn() function is taking a call-by-value parameter, so changing
that can't be expected to alter the caller's "a".  You can add a
couple of printf("%p\n"...)s to see ww8.s is not a.s.

In fact "a.s" does get altered a bit as you've observed, I think
because the default constructor "realmp::realmp(const realmp &)" (or
whatever the syntax is) will be a bytewise copy.  The result of
altering such a copy of an mpf_t will be unpredictable.  (Moving is
fine, but copying and expecting to use both copies isn't.)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]