summaryrefslogtreecommitdiff
path: root/src/expr/mkmetakind
diff options
context:
space:
mode:
Diffstat (limited to 'src/expr/mkmetakind')
-rwxr-xr-xsrc/expr/mkmetakind9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/expr/mkmetakind b/src/expr/mkmetakind
index b8dbc2dd6..84d18e218 100755
--- a/src/expr/mkmetakind
+++ b/src/expr/mkmetakind
@@ -148,6 +148,12 @@ function constant {
namespace expr {
+// The reinterpret_cast of d_children to \"$2 const*\"
+// flags a \"strict aliasing\" warning; it's 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\"
+
template <>
inline $2 const& NodeValue::getConst< $2 >() const {
AssertArgument(getKind() == ::CVC4::kind::$1, *this,
@@ -160,6 +166,9 @@ inline $2 const& NodeValue::getConst< $2 >() const {
: *reinterpret_cast< $2 const* >(d_children[0]);
}
+// re-enable the warning
+#pragma GCC diagnostic warning \"-Wstrict-aliasing\"
+
}/* CVC4::expr namespace */
namespace kind {
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback