Quantcast
Channel: Intel® C++ Compiler
Viewing all articles
Browse latest Browse all 1616

warning #69: integer conversion resulted in truncatio

$
0
0

Getting a warning with icpc (icpc (ICC) 15.0.3 20150407)

/n/dv/src/icc/releases/bin/icpc -std=c++14 -m32 -lstdc++ test.cc
test.cc(7): warning #69: integer conversion resulted in truncation
    test = (std::bitset<128> (0x0123456789abcdefULL << 36));

#include<iostream>
#include<bitset>

int main()
{
  std::bitset<128> test;
  test = (std::bitset<128> (0x0123456789abcdefULL << 36));
  std::cout<<test;
  std::bitset<128> value = (std::bitset<128>(0x1234567890123456) << 64) | std::bitset<128>(0x1234567890123456);
  std::cout<<value;
}

but g++ works

/n/sw/gen/gcc/x86-64/gcc-4.9.2/bin/g++ -std=c++14 -m32 test.cc

a.out
0000000000000000000000000000000000000000000000000000000000000000100110101011110011011110111100000000000000000000000000000000000000010010001101000101011001111000100100000001001000110100010101100001001000110100010101100111100010010000000100100011010001010110

 

any help will be apprecitated.

 

 

 

 

 


Viewing all articles
Browse latest Browse all 1616

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>