Re: Problems with SgStatement::copy()

Date: Tue, 9 Aug 1994 15:16:22 -0500

From: "Dennis Gannon" <gannon@cs.indiana.edu>

To: diego@cs.ualberta.ca

Subject: Re: Problems with SgStatement::copy()

Cc: sage-bugs@cica.indiana.edu

Diego,
here is one idea:
do not create a new statement and then copy over it with
the assignment operator. it is better to do the following
if (r_st) {
st = &(r_st->copy());
} else
st = 0;
the copy operator will allocate things for you.
However, i am not sure that this will also copy line numbers.
because you are creating a new "copy" of a statement, it is
not really part of the file and may not have copies of the line
numbers.
d.