I have found compilation error with "invalid lvalue in increment" in many forums on the web and I have not seen right solution. This is due to cast in left value of a post incrementation (ie: ((char *) a)++). This syntax is deprecated in gcc-3 and do an error in gcc-4. I haven't found option in gcc-4 to disable this error. Only solution I have found is to use gcc-3.