(or anything else that at compile time gets optimized away). It will not warn in the OPs case. Besides, there's no reason to assume the OP didn't use strict or warnings. And we shouldn't give the impressions people should post complete programs instead of relevant snippets showing the problem at hand. Which is what the OP did.