I\'m writing a library of functions that will safely convert between various numeric types or die trying.
My intent is roughly equal parts create-useful-library and learn-C-edge
Nothing requires the maximum of size_t to be larger than int. Such architectures where SIZE_MAX is <= INT_MAX are rare though and I doubt GCC would support any of them.
As for the fix, you can use #if:
#if INT_MAX > SIZE_MAX
if (u_value > SIZE_MAX) { /* Line 10 */
exit(EXIT_FAILURE);
}
#endif