<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - MSVC compatibility hack thwarted by typo correction"
   href="http://llvm.org/bugs/show_bug.cgi?id=20249">20249</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>MSVC compatibility hack thwarted by typo correction
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>C++
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>rnk@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvmbugs@cs.uiuc.edu, richard-llvm@metafoo.co.uk, rikka@google.com
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Introducing typo correction candidates causes a warning with -fms-compatibility
to become an error.

consider:

$ cat t.cpp
#ifdef BUG
namespace type_in_base_of_dependent_base {
struct A { typedef int NameFromBase; };
}
#endif

namespace function_template_deduction {
// Overloaded function templates.
template <int N> int f() { return N; }
template <typename T> int f() { return sizeof(T); }

// Dependent base class with enum.
template <typename T> struct A { enum { NameFromBase = 4 }; };
template <typename T> struct D : A<T> {
  // expected-warning@+1 {{use of undeclared identifier 'NameFromBase';
unqualified lookup into dependent bases}}
  int x = f<NameFromBase>();
};
}

$ clang -c t.cpp
t.cpp:16:13: warning: use of undeclared identifier 'NameFromBase'; unqualified
lookup into dependent bases of class template 'D' is a Microsoft extension
[-Wmicrosoft]
  int x = f<NameFromBase>();
            ^
            this->
1 warning generated.

$ clang -c t.cpp -DBUG
t.cpp:16:13: error: unknown type name 'NameFromBase'; did you mean
'type_in_base_of_dependent_base::A::NameFromBase'?
  int x = f<NameFromBase>();
            ^~~~~~~~~~~~
            type_in_base_of_dependent_base::A::NameFromBase
t.cpp:3:24: note: 'type_in_base_of_dependent_base::A::NameFromBase' declared
here
struct A { typedef int NameFromBase; };
                       ^
1 error generated.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>