All the languages I know of would execute something like:
i = 0
while i < 100000000
i += 1
..and you can see it take a noticeable amount of time to execute.
Why though, do languages do this? The only effect this code will have is taking time.
edit: I mean inside a function which is called
function main(){
useless()
}
function useless(){
i = 0
while i < 100000000
i += 1
}
i = 100000000
though (and that's exactly what gcc does if optimizations are enabled).