This is the mail archive of the glibc-bugs@sourceware.org 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]
Other format: [Raw text]

[Bug libc/12667] fscanf silently converts signed to unsigned


http://sourceware.org/bugzilla/show_bug.cgi?id=12667

--- Comment #3 from Alexander Enchevich <alexander.enchevich at yahoo dot com> 2011-04-12 13:37:12 UTC ---
The comment about errno actually relates to the problem with big numbers
(bigger than MAXINT), so the last 2 paragraphs should be switched:

> 
> Also, attempting to scan a number bigger than MAXINT (signed and unsigned),
> e.g. 6666666666 silently returns 0xFFFFFFFF as the scanned integer, which is
> also a bug. (I can file a separate report for it if it is preferable?)
>
> Interestingly, at the same time errno is set to 34 (Numerical result outside of
> range) so some code inside the lib does have some idea that something went
> wrong. This is yet another proof that this is a bug - you can't have errno set
> if everything is had supposedly worked fine.

Sorry about this..

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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