• Welcome to Valhalla Legends Archive.
 

unsigned long long

Started by Yegg, May 01, 2009, 06:42 PM

Previous topic - Next topic

Yegg

I was working on something with unsigned long long types and came across a weird observation. It turns out that when storing a numeric literal into a long long (and probably a long as well) in Objective-C (compiled with gcc through objc mode) that the compiler doesn't issue any errors, or even warnings when you don't append LL to the end of the literal, and the code still works just fine. With g++, it produces an error if the LL is not there and the compiler also labels the literal as a long, even though it should be long long.

Is there some special reason this happens? Or is there just a setting in the compiler that caused this?