[coreboot] Must-read for unsigned calculations

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Wed Oct 15 12:26:09 CEST 2008


I read the paper below some years ago, but it is still valid and being
aware of the contents can help avoid some totally non-obvious mistakes.
Especially for former ROMCC code which uses unsigned types heavily this
is a must read.
Please keep in mind that
if (a - b > c)
will not always do what you want if unsigned types are involved.


More information about the coreboot mailing list