From: Dejan Jovanović Date: Tue, 17 Apr 2012 20:42:09 +0000 (+0000) Subject: Fix for thos annoying "array index" warnings in production builds X-Git-Tag: cvc5-1.0.0~8227 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=49445d378eff9810787b88ef910906f8c0c372d1;p=cvc5.git Fix for thos annoying "array index" warnings in production builds --- diff --git a/src/expr/node_manager.h b/src/expr/node_manager.h index da999cc82..5e27962da 100644 --- a/src/expr/node_manager.h +++ b/src/expr/node_manager.h @@ -1383,10 +1383,17 @@ NodeClass NodeManager::mkConstInternal(const T& val) { nvStack.d_kind = kind::metakind::ConstantMap::kind; nvStack.d_rc = 0; nvStack.d_nchildren = 1; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" + nvStack.d_children[0] = const_cast(reinterpret_cast(&val)); expr::NodeValue* nv = poolLookup(&nvStack); +#pragma GCC diagnostic pop + + if(nv != NULL) { return NodeClass(nv); }