This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13259] New: link fails, if static const is passed to a template function
- From: "lev at cs dot technion dot ac dot il" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Dec 2003 15:15:25 -0000
- Subject: [Bug c++/13259] New: link fails, if static const is passed to a template function
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Bug happens (at least) on RedHat 7 (gcc 3.2.3) and cygwin (gcc 3.3.1)
Bug conditions (if relaxed, the bug disappears):
1. A class contains an initialized static const variable
2. There exists an external template function which may get this variable
as a parameter
3. A class contains a virtual function that calls the template function
above with static const as a parameter
Typical output: undefined reference to <var>; undefined reference to vtable.
--
Summary: link fails, if static const is passed to a template
function
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: lev at cs dot technion dot ac dot il
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13259