Check out comment 3 here for an example: http://jlhconsulting.gotdns.com/bugs/show_bug.cgi?id=193#c3 IMO when code is disabled, we should only scan for an '.endif' token and discard anything else.
Created attachment 204 [details] The patches!
Ok, here's one way of fixing this (attached patch). Basically we stop processing inside the tokeniser and a disabled block after the first symbol has been recorded. Not sure if that's 100% robust, but at least it doesn't break anything, and it should be good enough for pretty much all cases. The assumption here is that the disabled block will end with a single line that just has ".endif". So, unless there are objections I think this is good to go!
The problem came in where if there were errors in your code in the .if zeroed section, it would cause the assembler to error out. I'm not 100% convinced this will catch all those cases, but it's too good of a hack to not use. Just something to keep in mind. ;-)