[Bug c++/33569] New: A bug in inlining static const members.

juraj dot ivancic at gmail dot com gcc-bugzilla@gcc.gnu.org
Thu Sep 27 09:59:00 GMT 2007


Linkage of the following example reports an undefined reference to `A::anInt'.

---- example.cpp
struct A
{
        template<typename T>
        void operator%( T const & object ) {}
        static int const anInt = 5;
};

int main( void )
{
        A() % A::anInt;
        return 0;
}


-- 
           Summary: A bug in inlining static const members.
           Product: gcc
           Version: 4.1.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: juraj dot ivancic at gmail dot com
 GCC build triplet: i686 i386 GNU/Linux
  GCC host triplet: i686 i386 GNU/Linux
GCC target triplet: i686 i386 GNU/Linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33569



More information about the Gcc-bugs mailing list