gcc-3.3.2 says error: integer constant is too large for "long" type

Daniel Kegel dank@kegel.com
Wed Feb 4 01:23:00 GMT 2004


David Wuertele wrote:
> I'm looking for a clue as to why I get an error with my crosstool
> generated toolchain, but not with any other.  Here is my source file,
> test.c:
> 
>   int main ()
>   {
>     unsigned long long int test = 0x0008000000000000;
>   }
> 
> Here is the verbose output of the gcc-2.96 which works fine:

gcc-3.x is stricter.  You need to use ULL on the end of such constants.
Yes, this is a pain.  I've had to use #if statements to initialize
constants with and without the ULL for msvc and gcc-3.x.
- Dan

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com



More information about the crossgcc mailing list