The cops came in my house for an arrest warrant for a person other then me. They also had a search warrant for a gun. The cops told me that if I didn't tell them where the gun was located, they would tear-up the whole house then arrest me for the gun. I knew where the gun was located, I never touched it, my prints were not on it, and I didn't want to get locked up, so I told the cops where the gun was located. They were rude as shit to me. I was nothing but cooperative and helpful and they threatened me. Could they have arrested me if they found the gun and I didn't tell them where it was?
There are five different gun possessory offenses under the Violation of the Uniform Firearms Act (hereinafter "VUFA"): 1. Carrying the gun outside of your house without a license to carry; 2. Carrying a gun on the streets of Philadelphia without a license to carrry; 3. Possessing a firearm being a person prohibited by law to possess a firearm (ie felons can't have a gun); 4. Possessing a gun with an obliterated serial number; and 5. Possessing a gun that is stolen (a receiving stolen property theory).
If the cops come in your house and find a gun you can't be found guilty of the numbers one and two about because you are in your house. This seems like your situation based on the tone of your question.
However, numbers three, four and five are dependant on the term possession. There are three different types of possession: 1. actually on your person; 2. constructive possession; 3. indirectly on your person.
If the cops can show that you are a convicted felon, the serial number is blown-up, or the gun is stolen, and show that you are in possession of the gun, you can be prosecuted. Obviously, if you knew where the gun was located, you would have to make an arguement going to the finger prints.