GCC 4.5.0 20090618.

bug.cc:
--------------------------------------------------
typedef void (__attribute__((__stdcall__)) * F)();

template<typename T> struct S {
    S(T s) { T t = s; }
};

void f(F g)
{
    S<F> h = g;
}
--------------------------------------------------
bug.cc: In function 'void f(void (*)())':
bug.cc:9:14: error: invalid conversion from 'void (*)()' to 'void (*)()'
bug.cc:9:14: error:   initializing argument 1 of 'S<T>::S(T) [with T = void
(*)()]'


-- 
           Summary: Invalid conversion from 'T' to 'T' error when compiling
                    C++ code
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: d dot g dot gorbachev at gmail dot com
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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

Reply via email to