gcc-4.6 build fixes
authorClifford Wolf <clifford@clifford.at>
Tue, 1 Sep 2015 10:51:23 +0000 (12:51 +0200)
committerClifford Wolf <clifford@clifford.at>
Tue, 1 Sep 2015 10:51:23 +0000 (12:51 +0200)
frontends/blif/blifparse.cc
passes/opt/wreduce.cc

index 4bf0507410632ee4b5e637db98103291aee42b6b..9f2e08df0b4903b6a8b3ce08a78af09caee21e6b 100644 (file)
@@ -133,7 +133,7 @@ void parse_blif(RTLIL::Design *design, std::istream &f, std::string dff_name)
                                if (v[0] == '"') {
                                        std::string str(v+1);
                                        if (str.back() == '"')
-                                               str.pop_back();
+                                               str.resize(str.size()-1);
                                        const_v = Const(str);
                                } else {
                                        int n = strlen(v);
index 70a40e9605e1f239528be25c706aeed6345b7f8d..dfcfebf4bc3a6ac70597e48da455e581936cc83f 100644 (file)
@@ -348,9 +348,9 @@ struct WreducePass : public Pass {
                                continue;
 
                        for (auto c : module->selected_cells())
-                               if (c->type.in({"$reduce_and", "$reduce_or", "$reduce_xor", "$reduce_xnor", "$reduce_bool",
+                               if (c->type.in("$reduce_and", "$reduce_or", "$reduce_xor", "$reduce_xnor", "$reduce_bool",
                                                "$lt", "$le", "$eq", "$ne", "$eqx", "$nex", "$ge", "$gt",
-                                               "$logic_not", "$logic_and", "$logic_or"}) && GetSize(c->getPort("\\Y")) > 1) {
+                                               "$logic_not", "$logic_and", "$logic_or") && GetSize(c->getPort("\\Y")) > 1) {
                                        SigSpec sig = c->getPort("\\Y");
                                        c->setPort("\\Y", sig[0]);
                                        c->setParam("\\Y_WIDTH", 1);