Not sure if this is one of the cases where non-compilable output is expected.
I came across this snippet where a class is defined with multiple inheritances, and then offsets of inherited objects are read after casting through all inheritance levels.
hello.cc:117:96: error: ‘main()::A’ is an ambiguous base of ‘main()::O’
117 | static_cast<char>((reinterpret_cast<long *>(static_cast<A *>(&c)) - reinter
pret_cast<long *>(&c)))));
Not sure if this is one of the cases where non-compilable output is expected.
I came across this snippet where a class is defined with multiple inheritances, and then offsets of inherited objects are read after casting through all inheritance levels.
C++ Insights is only outputting the last class static_cast for each printf, so the first one will look like this:
g++ 12.2.0 error: