[Bug c++/17499] long long constant broken

schwab at suse dot de gcc-bugzilla@gcc.gnu.org
Fri Sep 17 20:16:00 GMT 2004


------- Additional Comments From schwab at suse dot de  2004-09-17 20:16 -------
> Constants have type "int", unless you use an extension.  If a constant  
> is too big for an int, it will be truncated. 
 
This is wrong.  Integer constants basically have the smallest type they fit 
in.  But 10293847561029384756 is even too big for long long, so its type is 
unsigned long long, hence the warning.  (The standard makes this actually 
undefined.) 

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17499



More information about the Gcc-bugs mailing list