A commenter on the flashing headlights post writes:

My wife tells me to watch my speed all the time, but especially if she notices a cop up ahead. Next time she does, I’ll let her know that she’s committing a crime and if she doesn’t stop it, I’ll report her to the police.

I take it that this was meant to suggest that the wife’s warning should not be seen as illegal, but I’m not sure the analogy is that helpful. Telling a friend or even a family member, “the police are coming, hide the illegal thing you’re doing,” might well be a crime, if your motive is in part to keep the person from getting caught.

Of course, if the illegal thing is only mildly illegal (e.g., a traffic violation), you’re not likely to be heavily punished for the warning; and, especially for minor offenses, prosecutors and judges are likely to cut some slack to people who are just showing loyalty to their spouses. Still, there’s no general legal right to warn people that the police are coming, even when those people are your nearest and dearest; and it may well be a crime (such as obstruction of justice or interfering with law enforcement).

For an interesting discussion of the issue, which expresses some sympathy to those who warn their family members, see United States v. Bucher (9th Cir. 2004):

A police officer comes to a mother’s home to arrest her son. He isn’t there. She later notifies the son that police want to arrest him. Should she be guilty of anything other than possibly loving a son who may not deserve it? What about a motorist who warns other motorists that they are entering a police “speed trap”? The price will prove extremely high if reasonable human conduct becomes criminal. However, the line between reasonable conduct and conduct that interferes with the performance of official conduct must be drawn.
Gabriel Bucher recognizes that he failed to obey a national park ranger’s command that he leave a National Park trail and that a regulation made such conduct unlawful. He vigorously contends that he did nothing to “interfere” with the rangers in the exercise of their duties, and that he was wrongly charged with violating 36 C.F.R. § 2.32(a)(1)(2000). His confusion is understandable, but also misplaced. By walking down the trail to warn a person whom the rangers intended to arrest, he did interfere with both the rangers and their official duties….
The night of April 26, 2001, rangers patrolling the Haleakala National Park met 14 hikers staying at a cabin on a trail about five miles from the nearest road. When they noticed several persons with marijuana, the rangers cited those who did not relinquish their contraband, then left the group to complete its trip.
That evening, Ranger Michael Boxx discovered that one of the hikers cited, 79-year-old Robert Jacobs, had given a false name. Aware of the group’s plan to complete its hike the next day, Boxx and other rangers went to the trail head parking lot in the morning to wait for Jacobs to arrive so they could arrest him.
While the rangers were staking out the trail head, one of the hikers, Gabriel Bucher, emerged from the trail. Boxx informed Bucher why they were there and asked where Jacobs was. Bucher indicated that he was 15 to 20 minutes behind him on the trail. Boxx told Bucher he was free to leave, but instructed him not to return to the trail. Boxx later testified that he gave this order because he “did not want [Bucher] to warn Mr. Jacobs of what we had intended for him so that it would not prolong the investigation with him going back into the crater and us following him.”
About five minutes later, Boxx noticed that Bucher had left the parking lot and returned to the trail. Through binoculars, he watched Bucher walk down the trail and huddle with Jacobs about a quarter mile from the trail head. Seeing this, the rangers decided to intercept Jacobs on the trail. As they approached Jacobs and Bucher, Jacobs suddenly fell to the ground, slipping into an apparent unconscious state. The rangers attended to Jacobs at the scene and called for an ambulance. After evacuating Jacobs from the park, the rangers concluded that he had feigned unconsciousness, apparently to avoid arrest.
For his role, Bucher was charged with intentionally interfering with a government employee or agent engaged in an official duty under 36 C.F.R. § 2.32(a)(1) (2000), a misdemeanor. After a bench trial, a magistrate judge found Bucher guilty and fined him $35. Bucher appealed to the district court, which affirmed his conviction. He appealed. We affirm….
Section 2.32(a)(1) requires proof of a specific intent to interfere with a government agent. “[C]ulpable intent … can be inferred from the defendant’s conduct and from the surrounding circumstances.” Here Bucher walked down the trail and spoke to Jacobs within minutes of learning that the rangers planned to arrest him. From this, any rational fact finder could conclude that he: (1) returned to the trail to help Jacobs avoid arrest (2) warned Jacobs of the rangers’ intent, which, (3) enabled Jacobs to concoct and mentally rehearse his performance. Although there is no direct evidence of what he actually said to Jacobs, it is reasonable to conclude a warning was delivered based on what Bucher knew before the conversation and on what Jacobs did shortly afterward. Circumstantial evidence establishes an intent to interfere.
The evidence also establishes that Bucher hindered the rangers’ arrest efforts. Bucher’s conversation with Jacobs validated Boxx’s concern that he would meddle in the investigation, leading the rangers to try and intercept Jacobs on the trail rather than wait for him in the parking lot. Furthermore, by “playing possum” — an act likely facilitated by Bucher’s warning — Jacobs added hours to the arrest process by forcing the rangers to carry him off the trail, call and wait for an ambulance, and escort him to the hospital. Bucher’s intentional acts thus set in motion a chain of events that interfered with the rangers and their official duties of investigating and arresting Jacobs. The evidence was sufficient.

Note that the particular form of interference here (Jacobs’ feigning unconsciousness) is somewhat unusual, and the particular consequence (Jacobs didn’t evade apprehension, but dealing with his reactions to the warning caused extra difficulty for the rangers) won’t be present in all cases. But the same reasoning would apply in a situation where the defendant warns a person that the police are looking for him, and the person gets away, or where the defendant warns a person that the police are out looking for illegal conduct, and the person hides or temporarily suspends the illegal conduct until the police pass by.