Carrying a gun in the trunk of an automobile has been held to be a violation of the law,  but the Commonwealth has to establish that the person had both the power of control over the weapon and the intention to exercise that control.
Possessing a gun in the car's trunk is considered illegal unless the state can demonstrate that the person had control over the firearm and planned to use it.