This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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 -


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]