Discussion:
[capnproto] Problem with C++ generator and minimum long value
m***@gmail.com
2017-12-13 17:07:29 UTC
Permalink
When setting a constant of value -9223372036854775808, the C++ generated is
the two following tokens -9223372036854775808ll which causes a warning with
GCC, integer constant is too large.
Could someone point me to the right place in the code so that I can fix it?

Thanks
--
You received this message because you are subscribed to the Google Groups "Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an email to capnproto+***@googlegroups.com.
Visit this group at https://groups.google.com/group/capnproto.
'Kenton Varda' via Cap'n Proto
2017-12-13 17:47:13 UTC
Permalink
Hi Mathias,

The place to modify is c++/src/capnp/compiler/capnpc-c++.c++, line 532.

What is your proposed fix here? I guess we need to write
(-9223372036854775807ll-1)?

-Kenton
Post by m***@gmail.com
When setting a constant of value -9223372036854775808, the C++ generated
is the two following tokens -9223372036854775808ll which causes a warning
with GCC, integer constant is too large.
Could someone point me to the right place in the code so that I can fix it?
Thanks
--
You received this message because you are subscribed to the Google Groups
"Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/capnproto.
--
You received this message because you are subscribed to the Google Groups "Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an email to capnproto+***@googlegroups.com.
Visit this group at https://groups.google.com/group/capnproto.
Mathias Gaunard
2017-12-13 20:42:34 UTC
Permalink
Precisely.
Post by 'Kenton Varda' via Cap'n Proto
Hi Mathias,
The place to modify is c++/src/capnp/compiler/capnpc-c++.c++, line 532.
What is your proposed fix here? I guess we need to write
(-9223372036854775807ll-1)?
-Kenton
Post by m***@gmail.com
When setting a constant of value -9223372036854775808, the C++ generated
is the two following tokens -9223372036854775808ll which causes a warning
with GCC, integer constant is too large.
Could someone point me to the right place in the code so that I can fix it?
--
You received this message because you are subscribed to the Google Groups "Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an email to capnproto+***@googlegroups.com.
Visit this group at https://groups.google.com/group/capnproto.
Loading...