Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22296

Assigning 128 bit integer in C

$
0
0

When I try to assign an 128 bit integer in gcc 4.9.1, I get a warning: integer constant is too large for its type.

Example Code

int main(void) {
  __uint128_t p = 47942806932686753431;

  return 0;
}

Output

I'm compiling with gcc -std=c11 -o test test.c and I get:

test.c: In function ‘main’:
test.c:2:19: warning: integer constant is too large for its type
   __uint128_t p = 47942806932686753431;
               ^

Am I doing something wrong or is this a bug in gcc?


Viewing all articles
Browse latest Browse all 22296

Latest Images

Trending Articles



Latest Images

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