Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

But can the compiler warn about such undefined behavior? Because if it can't, it's not much better than C.


I just tried:

    g++ -Wall -pedantic vec.cpp
And got no errors or warnings.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: