>>However, you don't neccessarily have to obey all laws - a law can prohibit you from making a statement; but a law cannot compel you to make a statement - so the claim is that if your actions conflict with the law in this way, then (at that instance) application of this law is unconstitutional and your violation is acceptable.
The law doesn't require you to do anything but not reveal the gag order. In such a situation your actions have caused you to be placed in a situation where you either have to lie or violate the law and the judge will recognize your intention was to reveal the gag order.
I'm not sure why the warrant canary line of reasoning doesn't extend to all situations where you are legally required not to reveal something. You could exhaustively enumerate every possibility (I did not receive a warrant asking about cash transactions in zip code 76225 targeting an occupant on maple street as a result of an ongoing FBI investigation).