Komentarze (10)
Pusta pętla w cpp to UB
To zrozumiałe, ale co to zmienia w kwestii wyjścia poza main() i odpalenie sobie pierwszej z brzegu funkcji?
@piotrb https://en.cppreference.com/w/cpp/language/for
"As part of the C++ forward progress guarantee, the behavior is undefined if a loop that has no observable behavior (does not make calls to I/O functions, access volatile objects, or perform atomic or synchronization operations) does not terminate. Compilers are permitted to remove such loops. "
Zaloguj się aby komentować