logoalt Hacker News

mdspanyesterday at 3:51 PM2 repliesview on HN

Compilers can still diagnose something as a warning even if it's not UB.


Replies

tialaramextoday at 10:43 AM

Warnings are poisoned in C++. It is popular to tell C++ compilers to convert all their warnings into fatal errors. So your only options are "Silently allow probably bad code" and "Program does not compile" because C++ programmers are allergic to nuance.

cppcppcppyesterday at 6:34 PM

Can, yes. Must, no.