From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10160 invoked by alias); 23 Jan 2004 15:46:06 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 10150 invoked by uid 48); 23 Jan 2004 15:46:05 -0000 Date: Fri, 23 Jan 2004 15:46:00 -0000 From: "bangerth at dealii dot org" To: gcc-bugs@gcc.gnu.org Message-ID: <20040123154602.13833.bangerth@dealii.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/13833] New: [3.4/3.5 regression] Conversion problem in template function X-Bugzilla-Reason: CC X-SW-Source: 2004-01/txt/msg02932.txt.bz2 List-Id: In this code --------------------- struct X { template X & operator << (const T &t); X & operator<< (int& (*p) (int&)); }; X x; template void foo () { x << (1 ? "ok" : "failed"); } template void foo<1>(); ------------------------ we now get g/x> /home/bangerth/bin/gcc-3.5-pre/bin/c++ -c x.cc x.cc: In function `void foo()': x.cc:10: error: conditional expression between distinct pointer types `const char (*)[3]' and `const char (*)[7]' lacks a cast That sounds bogus to me, though I could be wrong. This is with present mainline and tree-ssa (don't have 3.4 checked out right now, but that is likely to be affected as well). 3.3 is ok, though. Note that the same doesn't happen if foo is not a template, which makes me even more suspicious. W. -- Summary: [3.4/3.5 regression] Conversion problem in template function Product: gcc Version: 3.5.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: bangerth at dealii dot org CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13833