*From*: mohr@fullsail.cs.uoregon.edu*Subject*: cast expr problem*To*: sage-bugs@cica.cica.indiana.edu (Sage++ Bugs Mailinglist)*Date*: Wed, 24 Aug 1994 12:05:37 -0700 (PDT)

Hi, did anybody change something how "cast" operators are working in the last 2 or 3 weeks? Darryl's code generator for the breakpoint debugger is no longer working. The problem is basically the following three lines: /*1*/ void *objPtr; /*2*/ MyCollection<MyElement> *castedPtr; /*3*/ castedPtr = (MyCollection<MyElement> *) objPtr; He uses Sage++ to add these lines to a depfile. Then dep2C++ runs over it and then statement 3 unparses like this: castedPtr = MyCollection__MyElement * objPtr; i.e. the cast "()" are missing. If I add the 3 lines above manually to simple.pc, it works fine, so I think it has to do with his code which constructs these statements. Some more details: His code already generated statement 1 and 2. Now he wants to build statement 3; it's basically done like this: SgVarRefExp *lhs = new SgVarRefExp(*castedptrSymb); SgVarRefExp *rhs = new SgVarRefExp(*objptrSymb); SgExpression *cexp = new SgCastExp(*(lhs->type), *rhs); Then he uses "lhs" and "cexp" to build a SgCExpStmt; he uses a function for this which is used and works in a lot of places, so I think the problem is not here. Does anybody see a problem in the code above? any help welcome! if someone wants to look into his code in more detail, a good starting place is the file sage/breezy/typeInfo/TItypeDesc.C. Look for "castedPtr". His own Sage++ functions are in sage/breezy/baseUtils/sageUtils.C. Thanks a lot bernd -- Bernd Mohr -- mohr@cs.uoregon.edu -- http://www.cs.uoregon.edu/~mohr echo '[q]sa[ln0=aln256%Pln256/snlbx]sb3135071790101768542287578439snlbxq'|dc