Lunderberg commented on PR #16343: URL: https://github.com/apache/tvm/pull/16343#issuecomment-1877557121
The only potential downside would be if we have any code that depends on the non-standard name resolution used by MSVC. Most of the differences would result in compile-time failures, but there are some very weird edge cases that can occur. (e.g. Suppose `void func(int)` is declared before the template, and `void func(bool)` is declared after the template but before the template instantiation. Inside the template, a call to `func(true)` should resolve to `void func(int)`, because name resolution happens when the template is parsed. However, MSVC would silently and erroneously resolve it to `void func(bool)`, because it does the name lookup at instantiation time.) Even though two-phase name resolution has been the C++ standard as long as C++ has had a standard, MSVC still defaults to the non-standard name resolution for backwards compatibility with pre-C++98 code. Their worry is that switching to standard name resolution would silently switch behavior that was developed and compiled only on MSVC. Given that we primarily compile, test, and run on gcc/clang builds, I think this is very unlikely that we rely on MSVC's behavior, and any differences are most likely bugs in the MSVC build. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
