Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardC++strict aliasing rulesSingle-choice MCQ

Why does qualifying a pointer with `char*` (or `std::byte*`) interact specially with the strict aliasing rule?

int n = 0x41424344; char* p = reinterpret_cast<char*>(&n); char c = p[0]; // well-defined?