How to do portable 64 bit arithmetic, without compiler warnings

后端 未结 7 1016
情歌与酒
情歌与酒 2021-02-12 22:38

I occasionally use 64 bit arithmetic in an open source C++ library of mine. I discovered that long long serves my purpose quite nicely. Even some 10 year old solari

7条回答
  •  难免孤独
    2021-02-12 23:26

    You can silence the warning with -Wno-long-long (make sure it comes after -pedantic). 64-bit integers are required by C99 and I think also C++0x so compilers that don't have them are getting rare nowadays.

提交回复
热议问题