Probably not. But I'll bet if you did have engine trouble under warranty, and they knew you used 40 weight, they would deny the claim.
The manufacturers design the engines for a specific oil. In particular, the engine tolerances (mechanical gaps) are much smaller and more consistent than 15 - 30 years ago, due to advances in machining techniques. Since the engine is "tighter" the thinner oil flows easier and lubricates better. That's why 5w-30 is most prevalent now, where it used to be 10w-40 years ago. So going with the recommended oil is generally a good idea. Remember that the second number (30, 40, 50) is the weight or thickness of the oil. The first number is only cold temperature rating.
I would not run 5w-50 in any "modern" engine that calls for 5w-30, it's probably a bad thing.