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



             Bug #: 55170

           Summary: incorrect mangling, should not include prefix

    Classification: Unclassified

           Product: gcc

           Version: unknown

            Status: UNCONFIRMED

          Severity: normal

          Priority: P3

         Component: c++

        AssignedTo: unassig...@gcc.gnu.org

        ReportedBy: rafael.espind...@gmail.com





Given the testcase



namespace mozilla {

  template<typename From>

  struct IsConvertible {

    static const bool value =true;

  };



  template<bool B>

  struct EnableIf {

    typedef int Type;

  };



  template <typename S>

  void Handle(S x, typename EnableIf<IsConvertible<S>::value>::Type dummy) {

  }



  template void

  Handle(int x, EnableIf<IsConvertible<int>::value>::Type dummy);

}



With current gcc trunk (193066) we get

$ gcc -fabi-version=0 -c test.cpp -w

$ nm test.o

0000000000000000 W

_ZN7mozilla6HandleIiEEvT_NS_8EnableIfIXsrNS_13IsConvertibleIS1_EE5valueEE4TypeE



And with clang



$ ./build/bin/clang -c test.cpp

$ nm test.o

0000000000000000 W

_ZN7mozilla6HandleIiEEvT_NS_8EnableIfIXsr13IsConvertibleIS1_EE5valueEE4TypeE



I initially thought the bug was in clang and reported llvm.org/pr14118, but

John McCall says that "On cxx-abi-dev, I believe we decided that

prefixes on unresolved-names should be mangled essentially as written".

Reply via email to