I tried talking with my son tonight about not telling people that he is smart. It did not go well. He told me that he isn't hurting other people's feeling since he is telling the truth. Only lies hurt people.

I like his logic. I also tried to impress upon him that bragging was not acceptable. I don't think he could fully appreciate my reasoning.
I ended up just telling him it makes me happy when he doesn't say it to people. He promised me that he would try but he does know that I will still love him if he forgets.