Jens Geyer created THRIFT-3383:
----------------------------------
Summary: i64 related warnings
Key: THRIFT-3383
URL: https://issues.apache.org/jira/browse/THRIFT-3383
Project: Thrift
Issue Type: Bug
Components: C glib - Compiler
Environment: {code}
gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i586-suse-linux/4.8/lto-wrapper
Target: i586-suse-linux
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info
--mandir=/usr/share/man --libdir=/usr/lib --libexecdir=/usr/lib
--enable-languages=c,c++,objc,fortran,obj-c++,java,ada
--enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.8
--enable-ssp --disable-libssp --disable-plugin
--with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux'
--disable-libgcj --disable-libmudflap --with-slibdir=/lib --with-system-zlib
--enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch
--enable-version-specific-runtime-libs --enable-linker-build-id
--enable-linux-futex --program-suffix=-4.8 --without-system-libunwind
--with-arch-32=i586 --with-tune=generic --build=i586-suse-linux
--host=i586-suse-linux
Thread model: posix
gcc version 4.8.3 20140627 [gcc-4_8-branch revision 212064] (SUSE Linux)
{code}
Reporter: Jens Geyer
Assignee: Simon South
I get multiple warnings all related to i64 constants:
* warning: this decimal constant is unsigned only in ISO C90 (enabled by
default)
* warning: integer constant is too large for 'long' type (-Wlong-long)
{code}
/bin/sh ../../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I.
-I../../.. -I../../../lib/cpp/src/thrift -I../src -Wno-unused-function -g
-Wall -Wextra -pedantic -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -g -O2 -MT
gen-c_glib/libtestgenc_la-t_test_debug_proto_test_types.lo -MD -MP -MF
gen-c_glib/.deps/libtestgenc_la-t_test_debug_proto_test_types.Tpo -c -o
gen-c_glib/libtestgenc_la-t_test_debug_proto_test_types.lo `test -f
'gen-c_glib/t_test_debug_proto_test_types.c' || echo
'./'`gen-c_glib/t_test_debug_proto_test_types.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../..
-I../../../lib/cpp/src/thrift -I../src -Wno-unused-function -g -Wall -Wextra
-pedantic -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -g -O2 -MT
gen-c_glib/libtestgenc_la-t_test_debug_proto_test_types.lo -MD -MP -MF
gen-c_glib/.deps/libtestgenc_la-t_test_debug_proto_test_types.Tpo -c
gen-c_glib/t_test_debug_proto_test_types.c -fPIC -DPIC -o
gen-c_glib/.libs/libtestgenc_la-t_test_debug_proto_test_types.o
gen-c_glib/t_test_debug_proto_test_types.c: In function
't_test_one_of_each_instance_init':
gen-c_glib/t_test_debug_proto_test_types.c:1271:3: warning: integer constant is
too large for 'long' type [-Wlong-long]
object->integer64 = 10000000000;
^
gen-c_glib/t_test_debug_proto_test_types.c: In function
't_test_compact_test_constant_i64_list250_constant':
gen-c_glib/t_test_debug_proto_test_types.c:16023:5: warning: this decimal
constant is unsigned only in ISO C90 [enabled by default]
gint64 compact_test_constant_i64_list250256 = 4294967295;
^
gen-c_glib/t_test_debug_proto_test_types.c:16024:5: warning: integer constant
is too large for 'long' type [-Wlong-long]
gint64 compact_test_constant_i64_list250257 = 1099511627775;
^
gen-c_glib/t_test_debug_proto_test_types.c:16025:5: warning: integer constant
is too large for 'long' type [-Wlong-long]
gint64 compact_test_constant_i64_list250258 = 281474976710655;
^
gen-c_glib/t_test_debug_proto_test_types.c:16026:5: warning: integer constant
is too large for 'long' type [-Wlong-long]
gint64 compact_test_constant_i64_list250259 = 72057594037927935;
^
gen-c_glib/t_test_debug_proto_test_types.c:16027:5: warning: integer constant
is too large for 'long' type [-Wlong-long]
gint64 compact_test_constant_i64_list250260 = 9223372036854775807;
^
gen-c_glib/t_test_debug_proto_test_types.c: In function
't_test_compact_test_constant_i64_set294_constant':
gen-c_glib/t_test_debug_proto_test_types.c:16206:5: warning: this decimal
constant is unsigned only in ISO C90 [enabled by default]
gint64 compact_test_constant_i64_set294300 = 4294967295;
^
gen-c_glib/t_test_debug_proto_test_types.c:16207:5: warning: integer constant
is too large for 'long' type [-Wlong-long]
gint64 compact_test_constant_i64_set294301 = 1099511627775;
^
gen-c_glib/t_test_debug_proto_test_types.c:16208:5: warning: integer constant
is too large for 'long' type [-Wlong-long]
gint64 compact_test_constant_i64_set294302 = 281474976710655;
^
gen-c_glib/t_test_debug_proto_test_types.c:16209:5: warning: integer constant
is too large for 'long' type [-Wlong-long]
gint64 compact_test_constant_i64_set294303 = 72057594037927935;
^
gen-c_glib/t_test_debug_proto_test_types.c:16210:5: warning: integer constant
is too large for 'long' type [-Wlong-long]
gint64 compact_test_constant_i64_set294304 = 9223372036854775807;
^
gen-c_glib/t_test_debug_proto_test_types.c: In function
't_test_compact_test_constant':
gen-c_glib/t_test_debug_proto_test_types.c:16545:5: warning: integer constant
is too large for 'long' type [-Wlong-long]
constant->a_i64 = 1099511627775;
^
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)