This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/13259] New: link fails, if static const is passed to a template function


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]