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

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Similar testcase without auto, but in a template:
template <typename T>
int foo ()
{
  extern int a;
  extern T a;
  return a;
}

template <typename T>
int bar ()
{
  extern int b;
  extern T b;
  return b;
}

int c = foo <int> ();
int d = bar <long long> ();

g++ errors in both cases, clang++ only when T isn't int.

Reply via email to