From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9618 invoked by alias); 7 Aug 2003 18:46:05 -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 9608 invoked by uid 48); 7 Aug 2003 18:46:05 -0000 Date: Thu, 07 Aug 2003 18:46:00 -0000 Message-ID: <20030807184605.9605.qmail@sources.redhat.com> From: "bangerth at dealii dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20030807183306.11847.James.W.Mckelvey@jpl.nasa.gov> References: <20030807183306.11847.James.W.Mckelvey@jpl.nasa.gov> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/11847] [3.4 regression] reference does not work as template argument any more X-Bugzilla-Reason: CC X-SW-Source: 2003-08/txt/msg01061.txt.bz2 List-Id: PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11847 bangerth at dealii dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed| |1 GCC build triplet|sparc-sun-solaris2.7 | GCC host triplet|sparc-sun-solaris2.7 | GCC target triplet|sparc-sun-solaris2.7 | Last reconfirmed|0000-00-00 00:00:00 |2003-08-07 18:46:04 date| | Summary|std::string as template |[3.4 regression] reference |argument no longer works |does not work as template | |argument any more ------- Additional Comments From bangerth at dealii dot org 2003-08-07 18:46 ------- Indeed, I can confirm this on linux as well. Here's a smaller snippet: ---------------------------- extern const int a; template class X {}; template struct Y { X x; }; template struct Y; ---------------------------- g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c x.cc x.cc: In instantiation of `Y': x.cc:9: instantiated from here x.cc:6: error: could not convert template argument `&a' to `const int&' This used to work, but doesn't anymore. Since it only happens if Y is a template class, it seems as if this may have something to do with two-stage name lookup. W.