Your example is almost identical to yours in [basic.link] / 7 - Yes, your interpretation is correct.
Using the undefined q function makes your program poorly formed NDR . Therefore, VC ++ is technically consistent. However, you definitely want to report it.
Note that VC ++ produces the same output ("q ()"), even if we add the internal definition of q :
namespace X { void p() { void q(); q(); } void q() { std::cout << "This would be right"; } } void q() { std::cout << "q()" << '\n'; }
... but has reasonable behavior when extern used .
source share