Comment

Comment by hannob

This may be an instance of "you should really know the gcc/clang sanitizers and use them to test your code":

clang test.c -O0 -fsanitize=undefined

./a.out

[...]

test.c:17:12: runtime error: 9.22337e+18 is outside the range of representable values of type 'long'

Interestingly gcc doesn't throw that warning.

parent hannob 6 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton