The same basic rules apply to all bonds, whether corporate, treasury or something else. Obviously the big exception is muni bonds, because for most munis, the interest is free from federal taxation.
But with treasuries and corporate bonds, when you by a bond at a discount, and you hold it to...