[Prev][Next][Index]
Size expression in a new operator.
- From: Rahul Singh <rsingh@valhalla.cs.wright.edu>
- Date: Mon, 3 Jun 1996 13:32:38 -0400
- To: sage-bugs@extreme.indiana.edu
- Subject: Size expression in a new operator.
- Sender: owner-sage-bugs@extreme.indiana.edu
For the following SgCExpStmt I could not get a pointer to the expression (in []
brackets) that specifies size for the new expression.
w = (precision) new precisionType[PrecisionSize + sizeof(digit) * size];
For E pointing to the rhs () of the above expression, I got a pointer F to the
new expression with E->operand (1); this strips the cast expression from the
rhs (). F->operand(1) gave me the cast expression following new. However,
F->operand(1)->operand(1) did not strip the cast and give the desired
expression; I got a segmentation fault for this expression.
Rahul