Skip to content

Commit c5f65db

Browse files
darosiorsipa
andcommitted
miniscript: remove a workaround for a GCC 4.8 bug
Co-authored-by: Pieter Wuille <[email protected]>
1 parent dd17c42 commit c5f65db

File tree

1 file changed

+13
-15
lines changed

1 file changed

+13
-15
lines changed

src/script/miniscript.cpp

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,19 @@ Type SanitizeType(Type e) {
1717
int num_types = (e << "K"_mst) + (e << "V"_mst) + (e << "B"_mst) + (e << "W"_mst);
1818
if (num_types == 0) return ""_mst; // No valid type, don't care about the rest
1919
assert(num_types == 1); // K, V, B, W all conflict with each other
20-
bool ok = // Work around a GCC 4.8 bug that breaks user-defined literals in macro calls.
21-
(!(e << "z"_mst) || !(e << "o"_mst)) && // z conflicts with o
22-
(!(e << "n"_mst) || !(e << "z"_mst)) && // n conflicts with z
23-
(!(e << "n"_mst) || !(e << "W"_mst)) && // n conflicts with W
24-
(!(e << "V"_mst) || !(e << "d"_mst)) && // V conflicts with d
25-
(!(e << "K"_mst) || (e << "u"_mst)) && // K implies u
26-
(!(e << "V"_mst) || !(e << "u"_mst)) && // V conflicts with u
27-
(!(e << "e"_mst) || !(e << "f"_mst)) && // e conflicts with f
28-
(!(e << "e"_mst) || (e << "d"_mst)) && // e implies d
29-
(!(e << "V"_mst) || !(e << "e"_mst)) && // V conflicts with e
30-
(!(e << "d"_mst) || !(e << "f"_mst)) && // d conflicts with f
31-
(!(e << "V"_mst) || (e << "f"_mst)) && // V implies f
32-
(!(e << "K"_mst) || (e << "s"_mst)) && // K implies s
33-
(!(e << "z"_mst) || (e << "m"_mst)); // z implies m
34-
assert(ok);
20+
assert(!(e << "z"_mst) || !(e << "o"_mst)); // z conflicts with o
21+
assert(!(e << "n"_mst) || !(e << "z"_mst)); // n conflicts with z
22+
assert(!(e << "n"_mst) || !(e << "W"_mst)); // n conflicts with W
23+
assert(!(e << "V"_mst) || !(e << "d"_mst)); // V conflicts with d
24+
assert(!(e << "K"_mst) || (e << "u"_mst)); // K implies u
25+
assert(!(e << "V"_mst) || !(e << "u"_mst)); // V conflicts with u
26+
assert(!(e << "e"_mst) || !(e << "f"_mst)); // e conflicts with f
27+
assert(!(e << "e"_mst) || (e << "d"_mst)); // e implies d
28+
assert(!(e << "V"_mst) || !(e << "e"_mst)); // V conflicts with e
29+
assert(!(e << "d"_mst) || !(e << "f"_mst)); // d conflicts with f
30+
assert(!(e << "V"_mst) || (e << "f"_mst)); // V implies f
31+
assert(!(e << "K"_mst) || (e << "s"_mst)); // K implies s
32+
assert(!(e << "z"_mst) || (e << "m"_mst)); // z implies m
3533
return e;
3634
}
3735

0 commit comments

Comments
 (0)