case kind::BITVECTOR_SIGN_EXTEND:
out << "SX(";
toStream(out, n[0], depth, types, false);
- out << ", " << n.getOperator().getConst<BitVectorSignExtend>() << ')';
+ out << ", " << BitVectorType(n.getType().toType()).getSize() << ')';
return;
break;
case kind::BITVECTOR_ROTATE_LEFT:
void DumpC::setDumpFromString(const std::string& optarg) {
#ifdef CVC4_DUMPING
- char* optargPtr = strdup(optarg.c_str());
+ // Make a copy of optarg for strtok_r to use.
+ std::string optargCopy = optarg;
+ char* optargPtr = const_cast<char*>(optargCopy.c_str());
char* tokstr = optargPtr;
char* toksave;
while((optargPtr = strtok_r(tokstr, ",", &toksave)) != NULL) {
}
}
}
- free(optargPtr);
#else /* CVC4_DUMPING */
throw OptionException("The dumping feature was disabled in this build of CVC4.");
#endif /* CVC4_DUMPING */