summaryrefslogtreecommitdiff
path: root/src/expr/metakind_template.h
diff options
context:
space:
mode:
authorMorgan Deters <mdeters@cs.nyu.edu>2013-07-29 16:08:45 -0400
committerMorgan Deters <mdeters@cs.nyu.edu>2013-07-29 16:08:45 -0400
commitda9eec6aa0fc0f6c29f2c3fdb08bd45ba9c27808 (patch)
treedca1b2fb1d1c213a94d5b2902aed4a24895aae3f /src/expr/metakind_template.h
parentbc3db83a6856016c9c838fbabdd29f962aa60769 (diff)
Fix numerous compiler warnings on various platforms
Diffstat (limited to 'src/expr/metakind_template.h')
-rw-r--r--src/expr/metakind_template.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/expr/metakind_template.h b/src/expr/metakind_template.h
index 8486e8ec3..41813abde 100644
--- a/src/expr/metakind_template.h
+++ b/src/expr/metakind_template.h
@@ -270,6 +270,13 @@ inline void NodeValueConstPrinter::toStream(std::ostream& out, TNode n) {
toStream(out, n.d_nv);
}
+// The reinterpret_cast of d_children to various constant payload types
+// in deleteNodeValueConstant(), below, can flag a "strict aliasing"
+// warning; it should actually be okay, because we never access the
+// embedded constant as a NodeValue* child, and never access an embedded
+// NodeValue* child as a constant.
+#pragma GCC diagnostic ignored "-Wstrict-aliasing"
+
/**
* Cleanup to be performed when a NodeValue zombie is collected, and
* it has CONSTANT metakind. This calls the destructor for the underlying
@@ -289,6 +296,9 @@ ${metakind_constDeleters}
}
}
+// re-enable the strict-aliasing warning
+# pragma GCC diagnostic warning "-Wstrict-aliasing"
+
inline unsigned getLowerBoundForKind(::CVC4::Kind k) {
static const unsigned lbs[] = {
0, /* NULL_EXPR */
@@ -334,7 +344,7 @@ ${metakind_operatorKinds}
}/* CVC4::kind namespace */
-#line 338 "${template}"
+#line 348 "${template}"
namespace theory {
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback