Yeah using $ was pretty cheeky. I use a few other GCC specific features such as nested functions, which is why I specify that the standard is GNU99 rather than C99. If you have any errors on mac please post a bug report as I don't have a machine to test on! Thanks.
The use of the $ function is totally not portable though, which is a bit of a pity.
Doesn't compile on a mac either; bunch of warning about pointer size that are being treated as errors by -Werror
Still, nice work~!