40 is a slang term often used by Chicago rappers to refer to their guns. A 40 is any weapon(handgun) with a .40 caliber. 40 can be confused with the slang term 30 poppa, whereby a 40 is referring to the gun's caliber, a 30 poppa refers to an actual weapon with a 30 clip. A 40 can be refer to as a 30 poppa if it has a 30 clip inserted.
In RondoNumbaNine's 'Dont Know Me' song, he says "I’m in traffic with this 40 that got a beam plus a light, you wanna see?". In Montana of 300's "Let the 40 Bang", he says "You see that 30 clip up off that 40 hang"