All my colleagues offer good counsel, although I would assume if you can afford to make a cash gift of $40,000 you are not thinking that you will ever need to qualify for Medicaid.
A second consideration is whether or not you are married. If you are married, you and your wife can give up to $46,000 to your daughter and her fiance without being required to file a gift tax return ($13,000 from you to each of them, $13,000 from your wife to each of them).
If you are not married and you want to give them the $40,000, go ahead and do so. You are not required to report the first $26,000. Your accountant can prepare a Form 709 gift tax return for you (filed along with your income taxes by April 15 next year). The fee will probably be $100 to $200 for the filing, but no tax is due. It just comes off your $5 million lifetime gift tax exclusion, leaving you with a gift tax exemption of only $4,974,000! Even if the lifetime exclusion reverts to $1,000,000 in 2013, you will still have $974,000 of exemption remaining. Unless you do, in fact, have a Medicaid planning concern, don't let an arcane federal tax rule stop you from making a gift you wish to make and your daughter would deeply appreciate. Life is too short.