Partial handlling of 64-bit integer constants.
commit642bbe6386e832cbd3109f8f4e4923f6ad1858ed
authordreiss <dreiss@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 30 Jun 2008 20:45:47 +0000 (30 20:45 +0000)
committerdreiss <dreiss@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 30 Jun 2008 20:45:47 +0000 (30 20:45 +0000)
tree0b58c296fdf9f66169f70e368c948ade2a1a510c
parent4658968dd458910f0acf1b6a3557c7f1a046de09
Partial handlling of 64-bit integer constants.

- Parse integer constants in Thrift files as 64-bit ints.
- Die if an overflow occurs.
- Warn if an enum value cannot fit in 32 bits.
- Add a simple test for the above.

I ran all of the generators over BrokenConstants.thrift before adding the
overflow, and they appeared to work.  However, the code generated was not
always valid (for example, the 64-bit constant must have an LL suffix in C++).

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@672907 13f79535-47bb-0310-9956-ffa450edef68
compiler/cpp/src/parse/t_const_value.h
compiler/cpp/src/thriftl.ll
compiler/cpp/src/thrifty.yy
test/BrokenConstants.thrift [new file with mode: 0644]