TGViewer
C++ - Reddit C++ - Reddit @r_cpp · 229 subscribers
Post #24463 25
Visual Studio option /RTCc - what is its purpose?

Why does it exist?
Documentation says that it “Reports when a value is assigned to a smaller data type and results in a data loss.”
Except it is not what it actually does.
This runtime check reports a failure if discarded by a cast top bits are not the same (all 0 or all 1).
It is not a useful range check for either signed or unsigned types, almost as if someone did it to offend both equally...
I just can't understand why such an utterly useless option has been kept in a compiler for decades.
Am I missing something here?

https://redd.it/1pj0hyr
@r_cpp
Docs /RTC (Run-time error checks) The Microsoft C/C++ compiler /RTC options for run-time error checks.
More from @r_cpp
  1. Oct 11, 2026Right way to test async code https://redd.it/1x2wqgz @r_cpp
  2. Oct 10, 2026Yantra: an LALR(1) parser generator for C++23 Yantra: an LALR(1) parser generator for C++2…
  3. Oct 10, 2026Opting in, and back out again https://dryperspective.github.io/posts/opting-in/ https://re…
  4. Oct 10, 2026I’m Building Bursztyn OS a Polish Operating System From Scratch I’m building Bursztyn OS,…
  5. Oct 9, 2026std::variant, operator== and pattern matching I was thinking, wouldn't adding equality com…
  6. Oct 8, 2026Profiles for simplicity and guarantees - Bjarne Stroustrup - CppCon 2026 https://youtu.be/…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →