This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


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

Re: ["Vadim Zhukovsky" <zva@ukrpost.net>] scanf bug


On Tue, Jul 17, 2001 at 06:41:58PM +0200, Vadim Zhukovsky wrote:
> It fits signed long long. Look at attached file in the Andreas letter
> 
> 01000000000000000000000 = LLONG_MIN
> The same thing happens when scanning
> "0777777777777777777777" = LLONG_MAX
> or "01777777777777777777777" = ULLONG_MAX

01000000000000000000000 == 0x8000000000000000 != LLONG_MIN
LLONG_MIN is (-LLONG_MAX-1), ie. -01000000000000000000000.

	Jakub


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