BTW... this is not true for word variables which uses clrf regardless if you set them to 0, 0x00 or 0x0000, so it's only byte vars that generate unnecessary code.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Not a bug really but:
Myvar = 0
compiles to:
clrf MYVAR
while
Myvar = 0x00
compiles to:
movlw 0X00
movwf MYVAR
BTW... this is not true for word variables which uses clrf regardless if you set them to 0, 0x00 or 0x0000, so it's only byte vars that generate unnecessary code.