Legal restrictions would only be if it blocks your line of sight while driving. There are no legal restrictions as far as the FCC is concerned for the mounting of an antenna on a vehicle.
An antenna mounted on a brush guard on the front of a truck will radiate poorly to the rear of the vehicle, as the passenger compartment will block most of the signal in that direction.
It will radiate best to the front of the truck and almost as well on either side of the truck in front of the windshield.
Think of it as a half circle, with the diameter line running along the windshield, and very little of the signal going to the rear of the vehicle, and then only if some portion of the antenna sticks up above the roofline, which with a GMRS antenna that tends to max out at about 19 inches tall, is going to be next to nothing.
The best place to mount a magnetic mount antenna, or a fixed mount, on a vehicle, when possible, is the center of the roof.
This prevents the body of the vehicle from absorbing or reflecting (depending on the material it is made from) a portion of the signal.
It also gives the antenna the maximum amount of ground plane, with most mag mount antennas being grounded through the magnet, trunk, rain gutter and fender mounts are grounded at the mounting point, normally requiring some paint removal where the clamp screws or a single ground screw with a pointed tip, bear against the metal.
That's the short answer to your question, stop reading now unless you want to understand why that is the answer.
Think of the ground plane like this:
You run along the pavement, and the "pressure" between your feet and the ground propels you as far as your energy will take you.
Now, without a ground plane: You are in a space suit and step out of the international space station. No matter how fast you churn your legs to run, since you have nothing to push off against, you are not going very far, nor very fast.
The antenna has two components, the signal plane and the ground plane.
The signal plane is on a mag mount or trunk, fender, rear window glass mount or gutter mount antenna the wire rod, sometimes straight, sometimes with a coil like a spring in the middle, or with a loading coil at either the middle or bottom of the rod.
The coil or loading coil fools the transmitter into thinking the actual, physical length of the rod is longer than it really is by the way.
The signal radiates omni directional from that vertical rod.
The ground plane is what gives it traction, it "reflects" a portion of the signal at what is know as the takeoff angle of the antenna.
Think of the takeoff angle as the launch direction of your RF signal. A lower launch angle lets the signal travel a greater distance in the line of sight for VHF and UHF signals (GMRS is in the UHF band by the way), kind of "skimming the horizon, and in the HF bands lets it travel further before it begins bouncing between the Ionosphere and the ground. VHF and UHF do not bounce off the ionosphere, they travel right on through it and out into space, hence the reason for using those bands to communicate with the International Space Station, Apollo missions, shuttles, Mars Landers, Voyagers, etc.
Antennas usually see a takeoff angle between 30 and 45 degrees for VHF and UHF, with the ground plane at a 90-degree angle to the signal plane.
This yields the greatest line of sight distance in these bands, but putting the antenna on a fender or trunk lid changes the takeoff angle AND absorbs some of the signal in the higher body of the vehicle (the cab or passenger compartment).
A steep takeoff angle, one of 60-90 degrees, reflects the signal up sharply, resulting in close range communications, and is normally only used in the HF bands for close together contacts, these antennas are often referred to as NVIS antennas, or Near Vertical Incident Skywave antennas.