| ▲ | JoshTriplett 8 hours ago | ||||||||||||||||
I expect an infinite loop to be compiled into, for instance, a jump instruction jumping to itself. The OS, if there is any, is welcome to interrupt and context switch. I don't expect code that has no function calls at all to have a system call inserted into it. | |||||||||||||||||
| ▲ | leni536 7 hours ago | parent | next [-] | ||||||||||||||||
A call to a standard library function is still subject to the as if rule. It doesn't have to manifest into a call instruction to a standard library function. Much like memcpy in source code doesn't have to manifest to a call instruction. | |||||||||||||||||
| |||||||||||||||||
| ▲ | marcosdumay 8 hours ago | parent | prev [-] | ||||||||||||||||
Ok, I get this. The problem is that what you want is completely against the spirit of the entire language. If your point is that C++ should be more like C in general, I can agree with that. But if your point is that C++ should be literal on this specific case, performance be damned, and the rest of it is ok, then no, that's a bad one. | |||||||||||||||||
| |||||||||||||||||