Help fix or ignore aliasing warning in gcc
An intermediate cast to (void *), then cast to (long *) can get rid of the warning. I verified this earlier today (at least with gcc 3.4.5), that 

*(long*)(void*)&amp;buffer[0] = 0;


disabuses the compiler of the notion that the sky will fall if you cast &amp;buffer[0] to (long *). 

I would contend that this is better than using a -fno-strict-aliasing option, since -fno-strict-aliasing will have global effect, whereas the intermediate cast can be used on a case by case basis, and it's explicitly obvious in your actual source where you have dealt with the problem.