"Flashing" to warn of speed traps ahead is also illegal, but with regional caveats.
Keep in mind here gents: there's illegal by the letter of the law and there's what an officer is actually going to bother enforcing.
Catch a guy at the wrong moment and he just might ticket you. They're not stupid, they know this stuff happens.
Flash to pass is for overtaking a vehicle, my comment about flashing brights is for oncoming vehicles.
"Flash to pass" is a relatively new thing in automotive years. Somewhere around the 70's it became popular in Europe and migrated over to NA. While there's no definite start point or place, it was common on unrestricted speed roads (IE: autbahn) to "flash" a slower moving vehicle when overtaking. The flash was not done up on the bumper of the slower vehicle but from a long distance back. Basically, "I'm overtaking at a high rate of speed move over". In this context, it makes sense for safety. A vehicle overtaking in excess of 100Mph is getting into the unstable range, the less maneuvering the better. The slower vehicle giving way only makes sense, and they did (do). That's not to say they use it without agression over there either though. There's all kinds of drivers on all kinds of the worlds roads...
In NA, flash to pass is not used for this purpose. It is used in the antithesis of defensive driving. Flash to pass is used right up on a vehicle when traveling 10-20 mph faster and very often in impatience. Basically, git the "F" out of my way. Wrong, wrong, wrong.......God forbid someone come upon someone doing the speed limit when they want to exceed it. This is aggressive driving and part of what causes accidents and road rage. Now, like everything in life, there's two sides to that coin: defensive driving would dictate the driver doing the speed limit and being overtaken by someone traveling above it just get out of the way and let them pass. That's not about what's legal, it's about staying safe and alive. I personally get out of some A-hole's "riding my bumper at the speed limit" way at the first opportunity. As soon as they pass my stress level drops and my life expectancy goes up. It's not up to me to enforce the law, only to follow it to the best of my ability. They will get what they have coming to them eventually as those types of drivers are habitual, IOW: they do it all the time so they will come to misfortune eventually. "Getting theirs" will either be a ticket, an accident of just finally "P-ing off" the wrong guy...
Now, if you want to further complicate the discussion, these laws change from state to state down south and flashing your headlights at oncoming vehicles has varying degrees of legality....Canada can be even more confusing as we have federal and provincial vehicle legislation, Sometimes it is even further restricted by municipal laws.
Bottom line is know the law where you live, keep your vehicle in a safe configuration for you and others around you and drive defensively.
Everyone will live longer....