It would be illegal under Federal law wasn't a poll option.
Curious, where is it illegal under FED law? Federal law doesn't cover carrying on state property unless you are a prohibited possessor, IIRC.
To me, it depends where you live, where you vehicle is parked, what type of area it is, where you typically drive, what type of things you may or may not typically expect to run into, etc.
I would never leave a firearm in my vehicle if at all possible. I don't go to places where I am required to disarm, and yes, to some that is a PITA, here in AZ it really isn't as a very large number of businesses are firearms friendly.
I can see having a long gun, rifle or shotgun, in the vehicle in some specific circumstances, including but not limited to;
A) I live WAAAAY out on the woods, with poor cell/satellite phone service, where the "3 shots" emergency signal might be heard better than "HELP, HELP!" I would also keep some pistol flares, too. As mentioned, emergency food/water would be good - I do that already.
B) I live in Alaska or other wide open country with lots of big hungry predators. Then a nice lever action in a big bore caliber might be a real comfort, same as an Alaskan bush pilot, who can reasonably expect to have to use a firearm to defend against predators, at least to my extremely limited knowledge.
C) I live on the border/in the drug corridor. I'm keeping a long gun on my shoulder when possible, along with water, radio/cell phone/satellite phone, etc. This has been proven to be an area where violence is occurring more and more often on our side of the border as lax enforcement encouraged by corrupt politicians serve to allow the thugs and villains much more leeway to kill and destroy to move their "product", and steal it from each other. In the trunk might be a little too long to get to it, and having to get out of a vehicle with that long gun might be the last thing ever done - driving away while screaming for help in the phone, (hopefully they didn't bring an illegal cell phone jammer with them!), might be more conducive to long life...but giving them a reason to not come up anymore might give more life to your family and neighbors in the long run. Hard to make a stand on that.
So, I say, it depends. I can't see keeping an M-1A SOCOM in my trunk if I live and work in downtown Phoenix, but an M-1 Garand in the deep woods of Wyoming might be just the ticket for any number of situations.