This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/15410] New: error not flagged


The following code compiles without error despite the template signature mismatch between the template declaration and the friend declaration.

template<typename T, typename U>
struct      F;
class       W {
    template<int i>
    friend
    class F;
    int x;
    };

template<typename T, typename U>
struct  F {
    void Look(W& w) { w.x = 3; }
    };

int main() {
    W w;
    F<char, bool> f;
    f.Look(w);
    return 0;
    }

-- 
           Summary: error not flagged
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: igodard at pacbell dot net
                CC: gcc-bugs at gcc dot gnu dot org


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]