From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15753 invoked by alias); 11 Jul 2007 23:04:42 -0000 Received: (qmail 15721 invoked by uid 48); 11 Jul 2007 23:04:33 -0000 Date: Wed, 11 Jul 2007 23:04:00 -0000 Message-ID: <20070711230433.15720.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/32232] [4.1 Regression] ICE in resolve_overloaded_unification In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "reichelt at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-07/txt/msg01341.txt.bz2 ------- Comment #6 from reichelt at gcc dot gnu dot org 2007-07-11 23:04 ------- Mark, I don't think the fix for this PR is complete, because the following simplified testcase (which previously ICE'd) should compile IMHO: ============================================================= template struct A { A& operator<<(void (*)(A&)); }; template A& operator<<(A&, const A&); template void foo(A&); void bar() { A() << (1, foo); } ============================================================= But it is rejected with the following error message: bug.cc: In function 'void bar()': bug.cc:12: error: no match for 'operator<<' in 'A() << (0, foo)' bug.cc:3: note: candidates are: A< >& A< >::operator<<(void (*)(A< >&)) [with = int] An even smaller testcase for this problem is the following: ============================================================= struct A { A& operator<<(void (*)(A&)); }; template void foo(A&); void bar() { A() << (1, foo); } ============================================================= bug.cc: In function 'void bar()': bug.cc:10: error: no match for 'operator<<' in 'A() << (0, foo)' bug.cc:3: note: candidates are: A& A::operator<<(void (*)(A&)) The code compiles fine, if I remove the "0,". Btw, there's another glitch in the error message: The code contains "(1, foo)", which is printed as "(0, foo)" in the error message. -- reichelt at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mark at codesourcery dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32232