Fighting Compiler warnings
summary
A tiny hex digit to value routine in Boost.Algorithm triggers contradictory compiler diagnostics: one compiler warns that control reaches end of nonvoid function, another warns about converting to unsigned char as a narrowing conversion. Iterating through versions (plain, templated, local variable) surfaces unreachable-code and narrowing bugs, a bad user cast suppresses warnings but masks real compiler errors, and the takeaway is to fix code or report compiler bugs rather than silencing warnings.
AI-written summary · about
related talks
01h 30mDangerous Optimizations in C and C++ Programming Languages
05mDetecting Programs That Rely on Undefined Behavior
15mC++ WAT
29mintegral types
54mTypical C++, But Why?
51mTypical C++, but Why?
01h 04mRemoving Needless Undefined Behavior for a Safer C++
01h 27mDangerous Optimizations! in C++ - Part Deux
