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

--- Comment #4 from Anders Granlund <anders.granlund.0 at gmail dot com> ---
I'm pulling in this test case from my related bug report.

  int x = 1;

  int main() {
      extern int x;
      using ::x;
  }

I this case the program is well-formed (the two declarations in main are not
conflicting), but error messages are still given:

  prog.cc: In function 'int main()':
  prog.cc:5:13: error: redeclaration of 'int x'
       using ::x;
               ^
  prog.cc:4:16: note: previous declaration 'int x'
       extern int x;
                  ^

Reply via email to