32-bit compilation fails due to broken INT64 macro

Bug #519470 reported by Alex Yurchenko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
percona-tools
Confirmed
Low
Unassigned

Bug Description

$ g++ -m32 -g -m32 -O2 -Wall -D__STDC_CONSTANT_MACROS -
D__STDC_FORMAT_MACROS `mysql_config --include` -c ../src/CE.cpp -
o ../obj/CE.o
In file included from ../src/../inc/EGenTables_stdafx.h:72,
                 from ../src/../inc/EGenLoader_stdafx.h:65,
                 from ../src/../inc/CETxnInputGenerator.h:44,
                 from ../src/../inc/CE.h:110,
                 from ../src/CE.cpp:42:
../src/../inc/FinancialTable.h:69: error: integer constant is too
large for ‘long’ type

../src/../inc/FinancialTable.h:69:

const INT64 iFinancialOutBasicMax = 9500000000; // too much money?

Changed in perconatools:
importance: Undecided → Medium
status: New → Confirmed
assignee: nobody → Yasufumi Kinoshita (yasufumi-kinoshita)
importance: Medium → Low
Revision history for this message
Seppo Jaakola (seppo-jaakola) wrote :

Problem seems to be in the representation of 64bit constant.
Modifying inc/FinancialTable.h:69, like this:

const INT64 iFinancialOutBasicMax = 9500000000LL;

or, like this:

const INT64 iFinancialOutBasicMax = INT64_C(9500000000);

...makes it possible to build in 32bit platform.
(not sure if it runs, but build completes, at least...)

Stewart Smith (stewart)
Changed in perconatools:
assignee: Yasufumi Kinoshita (yasufumi-kinoshita) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.