Someone buying a gun with the intention of giving it to someone else is considered a straw buyer and it is a violation of federal law. Buying a gun is not like buying some other piece of merchandise to give as a gift. Also the gun would not be registered to you.