public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/13833] New: [3.4/3.5 regression] Conversion problem in template function @ 2004-01-23 15:46 bangerth at dealii dot org 2004-01-23 16:50 ` [Bug c++/13833] " pinskia at gcc dot gnu dot org ` (4 more replies) 0 siblings, 5 replies; 6+ messages in thread From: bangerth at dealii dot org @ 2004-01-23 15:46 UTC (permalink / raw) To: gcc-bugs In this code --------------------- struct X { template <typename T> X & operator << (const T &t); X & operator<< (int& (*p) (int&)); }; X x; template <int> 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/13833] [3.4/3.5 regression] Conversion problem in template function 2004-01-23 15:46 [Bug c++/13833] New: [3.4/3.5 regression] Conversion problem in template function bangerth at dealii dot org @ 2004-01-23 16:50 ` pinskia at gcc dot gnu dot org 2004-01-25 21:21 ` mmitchel at gcc dot gnu dot org ` (3 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: pinskia at gcc dot gnu dot org @ 2004-01-23 16:50 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From pinskia at gcc dot gnu dot org 2004-01-23 16:50 ------- Confirmed from Phil's regression hunter: Search converges between 2003-08-19-trunk (#377) and 2003-08-20-trunk (#378). -- What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed| |1 Keywords| |rejects-valid Last reconfirmed|0000-00-00 00:00:00 |2004-01-23 16:50:36 date| | Target Milestone|--- |3.4.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13833 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/13833] [3.4/3.5 regression] Conversion problem in template function 2004-01-23 15:46 [Bug c++/13833] New: [3.4/3.5 regression] Conversion problem in template function bangerth at dealii dot org 2004-01-23 16:50 ` [Bug c++/13833] " pinskia at gcc dot gnu dot org @ 2004-01-25 21:21 ` mmitchel at gcc dot gnu dot org 2004-01-26 3:05 ` cvs-commit at gcc dot gnu dot org ` (2 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: mmitchel at gcc dot gnu dot org @ 2004-01-25 21:21 UTC (permalink / raw) To: gcc-bugs -- What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot gnu |mark at codesourcery dot com |dot org | Status|NEW |ASSIGNED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13833 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/13833] [3.4/3.5 regression] Conversion problem in template function 2004-01-23 15:46 [Bug c++/13833] New: [3.4/3.5 regression] Conversion problem in template function bangerth at dealii dot org 2004-01-23 16:50 ` [Bug c++/13833] " pinskia at gcc dot gnu dot org 2004-01-25 21:21 ` mmitchel at gcc dot gnu dot org @ 2004-01-26 3:05 ` cvs-commit at gcc dot gnu dot org 2004-01-26 3:13 ` cvs-commit at gcc dot gnu dot org 2004-01-26 4:46 ` pinskia at gcc dot gnu dot org 4 siblings, 0 replies; 6+ messages in thread From: cvs-commit at gcc dot gnu dot org @ 2004-01-26 3:05 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-01-26 03:05 ------- Subject: Bug 13833 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_4-branch Changes by: mmitchel@gcc.gnu.org 2004-01-26 03:05:33 Modified files: gcc/cp : ChangeLog call.c pt.c gcc/testsuite : ChangeLog Added files: gcc/testsuite/g++.dg/template: cond3.C Log message: PR c++/13833 * call.c (build_over_call): Do not convert arguments when processing a template. * pt.c (build_non_dependent_expr): Do not build a NON_DEPENDENT_EXPR for arithmetic constants. PR c++/13833 * g++.dg/template/cond3.C: New test. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3892.2.14&r2=1.3892.2.15 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/call.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.452.2.2&r2=1.452.2.3 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.816.2.3&r2=1.816.2.4 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3389.2.18&r2=1.3389.2.19 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/cond3.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13833 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/13833] [3.4/3.5 regression] Conversion problem in template function 2004-01-23 15:46 [Bug c++/13833] New: [3.4/3.5 regression] Conversion problem in template function bangerth at dealii dot org ` (2 preceding siblings ...) 2004-01-26 3:05 ` cvs-commit at gcc dot gnu dot org @ 2004-01-26 3:13 ` cvs-commit at gcc dot gnu dot org 2004-01-26 4:46 ` pinskia at gcc dot gnu dot org 4 siblings, 0 replies; 6+ messages in thread From: cvs-commit at gcc dot gnu dot org @ 2004-01-26 3:13 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-01-26 03:13 ------- Subject: Bug 13833 CVSROOT: /cvs/gcc Module name: gcc Changes by: mmitchel@gcc.gnu.org 2004-01-26 03:13:49 Modified files: gcc/cp : ChangeLog call.c pt.c gcc/testsuite : ChangeLog Added files: gcc/testsuite/g++.dg/template: cond3.C Log message: PR c++/13833 * call.c (build_over_call): Do not convert arguments when processing a template. * pt.c (build_non_dependent_expr): Do not build a NON_DEPENDENT_EXPR for arithmetic constants. PR c++/13833 * g++.dg/template/cond3.C: New test. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3908&r2=1.3909 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/call.c.diff?cvsroot=gcc&r1=1.454&r2=1.455 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&r1=1.819&r2=1.820 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3420&r2=1.3421 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/cond3.C.diff?cvsroot=gcc&r1=1.1&r2=1.2 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13833 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/13833] [3.4/3.5 regression] Conversion problem in template function 2004-01-23 15:46 [Bug c++/13833] New: [3.4/3.5 regression] Conversion problem in template function bangerth at dealii dot org ` (3 preceding siblings ...) 2004-01-26 3:13 ` cvs-commit at gcc dot gnu dot org @ 2004-01-26 4:46 ` pinskia at gcc dot gnu dot org 4 siblings, 0 replies; 6+ messages in thread From: pinskia at gcc dot gnu dot org @ 2004-01-26 4:46 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From pinskia at gcc dot gnu dot org 2004-01-26 04:46 ------- Fixed for 3.4 and 3.5. -- What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13833 ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-01-26 4:46 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2004-01-23 15:46 [Bug c++/13833] New: [3.4/3.5 regression] Conversion problem in template function bangerth at dealii dot org 2004-01-23 16:50 ` [Bug c++/13833] " pinskia at gcc dot gnu dot org 2004-01-25 21:21 ` mmitchel at gcc dot gnu dot org 2004-01-26 3:05 ` cvs-commit at gcc dot gnu dot org 2004-01-26 3:13 ` cvs-commit at gcc dot gnu dot org 2004-01-26 4:46 ` pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).