You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)))));
The text was updated successfully, but these errors were encountered:
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:
The text was updated successfully, but these errors were encountered: