https://bugzilla.kernel.org/show_bug.cgi?id=61511 --- Comment #2 from Ian Pilcher <arequipeno@xxxxxxxxx> --- (In reply to walter from comment #1) > please try this code: > > #include <stdio.h> > #include <errno.h> > int main() > { > int ret,i; > ret=sscanf("9999999999999999999999999999999", "%d", &i); > perror("scanf"); > printf("ret=%d i=%d\n",ret,i); > return 0; > } scanf: Numerical result out of range ret=1 i=-1 So it is setting errno, but it's still returning 1. That's just weird. (But allowed, since the behavior is undefined in this case.) Perhaps the ERANGE section could note that it can occur even when the function does not return EOF. -- You are receiving this mail because: You are watching the assignee of the bug. -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html