This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: gcc 3.3: long long bug?
- From: "A.R. Ashok Kumar" <ashokar at sankhya dot com>
- To: John Love-Jensen <eljay at adobe dot com>
- Cc: Lev Assinovsky <LAssinovsky at algorithm dot aelita dot com>, Andreas Schwab <schwab at suse dot de>, Eric Botcazou <ebotcazou at libertysurf dot fr>, gcc-help at gcc dot gnu dot org
- Date: Mon, 7 Apr 2003 19:41:04 +0530 (IST)
- Subject: Re: gcc 3.3: long long bug?
Hi,
> > ------
> > 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.
Yes, it works fine for "%lld" format. Thanks!
- AshokA -