Depends on the state. All this talk that it's within your rights is false. It all really depends on how well of the officer can articulate his reasons for arresting you and his tolerance for hearing that from you.
Some can take it as a threat, and therefore arrest you for their own "safety." Some will just blow you off as some clown.
Depending on the situation, they can also arrest you for Disorderly Conduct and it'll probably hold up because a judge is not going to just go by your words, but the intent behind them. It can and probably will be considered a form of harassment.