https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91746

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Just for refernce of the C++ standard wording:
[basic.scope.class] paragraph 2:

"A name N used in a class S shall refer to the same declaration in its context
and when re-evaluated in the completed scope of S. No diagnostic is required
for a violation of this rule."

NOTE the "No dianostic is required" part.  So even though it is invalid to do
this, compilers don't need to check for volations.  If you want clang/MSVC to
detect the violation of this rule, please file a bug with them.

Reply via email to