cc1plus: error: candidates are: #‘tree_list’ not supported by dump_decl#

source code clone download copy to clipboard

ShareThisreport bug / make suggestion

1

2

3

4

5

6

7

8

9

10

 int x; 

      namespace A {  int x; }

      namespace B {  int x; }

      int main()

       {

        using namespace A;

        using namespace B;

         x;  // error : ambiguity between A::i & B::i

        return 0;

       }

prog.cpp: In function ‘int main()’:

prog.cpp:8: error: reference to ‘x’ is ambiguous

cc1plus: error: candidates are: #‘tree_list’ not supported by dump_decl#<declaration error>

prog.cpp:2: error:                 int A::x

prog.cpp:8: error: reference to ‘x’ is ambiguous

cc1plus: error: candidates are: #‘tree_list’ not supported by dump_decl#<declaration error>

prog.cpp:2: error:                 int A::x

你可能感兴趣的:(error)