["Vadim Zhukovsky" <zva@ukrpost.net>] scanf bug
Jakub Jelinek
jakub@redhat.com
Tue Jul 17 08:51:00 GMT 2001
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
More information about the Libc-alpha
mailing list