---
title: "GCC出现warning: integer constant is too large for 'long' type\"  "
author: "andy136566"
date: "2011-08-15T02:07:08Z"
tags: []
categories: ["编程语言"]
slug: "gcc-warning-integer-constant-is-too-large-for-long-type"
draft: false
lastmod: "2011-08-15T02:07:08Z"
id: 1149166
url: "https://andy136566.iteye.com/blog/1149166"
---

The warning message can be safely ignored, as mb-gcc is not doing anything wrong; the 64-bit computing is in fact correct.

This warning occurs because gcc is strict in syntax and requires LL on the end of such constants. This warning message disappears if the integer is appended with LL.

long long int test = 0x0008888000000000LL;

[http://mazaoliang.blog.163.com/blog/static/138455093201151603823383/](http://mazaoliang.blog.163.com/blog/static/138455093201151603823383/)