gcc 3.3: long long bug?

John Love-Jensen eljay@adobe.com
Mon Apr 7 13:40:00 GMT 2003


Hi Ashok,

> ------
> const long long n = 34359738368LL;
> int  main() {
>       printf("%ld\n", n);
> }
> ------

Are you sure the format is supposed to be "%ld\n"?  Or is it supposed to be
"%lld\n" or "%Ld\n"?

The "%ld" format is for date type "signed long int", and a "long long" is
(usually) NOT the same data type and printf type format.

Sincerely,
--Eljay




More information about the Gcc-help mailing list