summaryrefslogtreecommitdiff
path: root/src/expr/mkmetakind
diff options
context:
space:
mode:
authorMorgan Deters <mdeters@gmail.com>2010-04-14 06:21:26 +0000
committerMorgan Deters <mdeters@gmail.com>2010-04-14 06:21:26 +0000
commit7c83d004874a46efe36d58717f7a4d72553b3693 (patch)
tree40fdb91a99c0ea0a9e4ce884126c0f572959a003 /src/expr/mkmetakind
parent12a8a7f9a90e45e8313f26af527a52e6dda943d3 (diff)
* Better dependency tracking for unit test building and linking, and
auto-generated headers (metakind.h etc.), so they don't have to be recompiled every time. This drastically improves build time when only small updates are made. * Added "memory.h" unit test header for checking out-of-memory conditions. cdlist_black uses it. * Added helpful output when you "make lcov" in a non-coverage-enabled build. * Removed strict aliasing warning when compiling metakind.h header with optimization on. * Removed const version of NodeBuilder::operator Node()---it was poorly performing, better to not permit it---and fixed the convenience builders to use the non-const version (re: code review #63) * Color-coded test output on capable terminals. * Fixed some warnings in unit tests.
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