C++ does not allow shadowing template parameters, but previously we
allowed it under -fms-extensions. Now this behavior is controlled by
-fms-compatibility, and we emit a -Wmicrosoft-template warning when it
happens.
Fixes PR43265
Differential D67463
[MS] Warn when shadowing template parameters under -fms-compatibility rnk on Sep 11 2019, 1:08 PM. Authored by
Details C++ does not allow shadowing template parameters, but previously we Fixes PR43265
Diff Detail
Event TimelineComment Actions Nice! Hopefully this is rare enough that putting it under an existing warning flag won't be too inconvenient. Comment Actions You probably already know this, but the behavior between MSVC & Clang is different as to the value of the constant (testcase for PR43265). Do you think this patch could/should be back-ported into 9.0.1? At least having the warning gives an indication about a potential failure. Comment Actions @hans, are we still accepting 9.0.1 patches? I thought we'd already made a release candidate. Comment Actions I'm still accepting patches until rc2 (which should have been Monday, but was delayed), so I can pull it if you think it is important. Comment Actions You know, it's a significant change in behavior. This will cause hard errors for users of -fms-extensions who do not use -fms-compatibility. Maybe it's better to release that changes in the 10.0 release. |