Testing long long variable results in incorrect when using MinGW
Attempts to test a long long variable using IBM Rational Test RealTime result in an unexpected value in the report.
You test MyVarLong in the following way.
All source code and/or binaries attached to this document are referred to here as "the Program". IBM is not providing program services of any kind for the Program. IBM is providing the Program on an "AS IS" basis without warranty of any kind. IBM WILL NOT BE LIABLE FOR ANY ACTUAL, DIRECT, SPECIAL, INCIDENTAL, OR INDIRECT DAMAGES OR FOR ANY ECONOMIC CONSEQUENTIAL DAMAGES (INCLUDING LOST PROFITS OR SAVINGS), EVEN IF IBM, OR ITS RESELLER, HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
The test truncated the obtained value to a 32-bits value.
Minimalist GNU for Windows (MinGW) uses the MSVCRT library for the printf format that Test RealTime uses.
Resolving the problem
You need to customize the MinGW Target Deployment Port to use the MSVCRT library.
To do so, use the Target Deployment Port Editor in Parser Settings > Header adaptation for C.
More support for:
Rational Test RealTime
Component Testing: C
Software version: 7.5, 22.214.171.124, 126.96.36.199, 188.8.131.52, 184.108.40.206, 220.127.116.11, 18.104.22.168, 8.0, 22.214.171.124, 126.96.36.199, 188.8.131.52
Operating system(s): Windows
Reference #: 1612988
Modified date: 19 April 2013
Translate this page: