All popular image file formats ( jpeg, png, gif, etc. ) can be identified from the first few bytes in the file. This is a good thing, because you cannot always trust file name extensions to be correct, and because…

The Trouble with gcc's --short-enums Flag

GCC has a cool and relatively obscure optimization flag called short-enums. It is the kind of tweaky little optimization that I get excited about, but it has a dark side that bit me. What to love about short-enums Normally GCC…