THRIFT-1276 Add thrift compiler option to suppress warnings about
Patch: Dave Watson
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1159593 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/compiler/cpp/src/thrifty.yy b/compiler/cpp/src/thrifty.yy
index f50c1e2..c916604 100644
--- a/compiler/cpp/src/thrifty.yy
+++ b/compiler/cpp/src/thrifty.yy
@@ -618,7 +618,7 @@
pdebug("ConstValue => tok_int_constant");
$$ = new t_const_value();
$$->set_integer($1);
- if ($1 < INT32_MIN || $1 > INT32_MAX) {
+ if (!g_allow_64bit_consts && ($1 < INT32_MIN || $1 > INT32_MAX)) {
pwarning(1, "64-bit constant \"%"PRIi64"\" may not work in all languages.\n", $1);
}
}