http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57638

            Bug ID: 57638
           Summary: warning container: 'integer_cst’ not supported by
                    dump_type#<type error>
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: chris at bubblescope dot net

The following code (notice the function takes a long long, the template takes
an int. This code is invalid)

template<int x>
struct S {};

template<long long i>
void g(S<i>);

void f()
{
    S<1000> t;
    g(t);
}


Produces the warning (in svn head and 4.7.0)

t.cc: In function ‘void f()’:
t.cc:11:8: error: no matching function for call to ‘g(S<1000>&)’
     g(t);
        ^
t.cc:11:8: note: candidate is:
t.cc:6:6: note: template<long long int i> void g(S<i>)
 void g(S<i>);
      ^
t.cc:6:6: note:   template argument deduction/substitution failed:
t.cc:11:8: note:   mismatched types ‘long long int’ and ‘#‘integer_cst’ not
supported by dump_type#<type error>’
     g(t);
        ^
t.cc:11:8: note:   ‘S<1000>’ is not derived from ‘S<i>’

Reply via email to