2 strtoul failed to report the error for some overflow corner cases.
14 #if ULONG_MAX <= 0xffffffff
15 #if !defined(__SDCC_pdk14) && !defined(__SDCC_pdk15) && !defined(__SDCC_mcs51) // Lack of memory. TODO: Enable once strtoul uses a more efficient implementation.
16 char s
[] = "5000000000";
17 unsigned long l
= strtoul(s
, NULL
, 10);
18 ASSERT(l
== ULONG_MAX
);
19 ASSERT(errno
== ERANGE
);