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++/16630] New: missing type name in __PRETTY_FUNCTION__


When compiled with g++ 3.4, the program below produces the following output:
    const char* D<U>::foo(typename B<T>::X) [with U = int]

Note that the type T the function argument depends on is not shown. The
expected output (e.g., when compiled with EDG eccp or HP aCC) is something
like:
    const char *D<U>::foo(B<U>::X) [with U = int]

extern "C" int printf (const char*, ...);

template <class T>
struct B { typedef T X; };

template <class U>
struct D
{
    const char* foo (typename B<U>::X) { return __PRETTY_FUNCTION__; }
};

int main ()
{
    printf ("%s\n", D<int>().foo (0));
}

-- 
           Summary: missing type name in __PRETTY_FUNCTION__
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: sebor at roguewave dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: all
  GCC host triplet: all
GCC target triplet: all


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


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