[Bug c++/82029] New: [8 Regression] bogus error: ‘__PRETTY_FUNCTION__’ was not declared in this scope

trippels at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Aug 30 09:33:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82029

            Bug ID: 82029
           Summary: [8 Regression] bogus error: ‘__PRETTY_FUNCTION__’ was
                    not declared in this scope
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: trippels at gcc dot gnu.org
  Target Milestone: ---

% cat MCContext.ii
template <typename> struct A {
  void m_fn1() {
    [] { __PRETTY_FUNCTION__; };
  }
};
struct B {
  A<int> COFFAllocator;
  void m_fn2();
};
void B::m_fn2() { COFFAllocator.m_fn1(); }

 % g++ -c MCContext.ii
MCContext.ii: In instantiation of ‘void A< <template-parameter-1-1> >::m_fn1()
[with <template-parameter-1-1> = int]’:
MCContext.ii:10:39:   required from here
MCContext.ii:3:10: error: ‘__PRETTY_FUNCTION__’ was not declared in this scope
     [] { __PRETTY_FUNCTION__; };
          ^~~~~~~~~~~~~~~~~~~


More information about the Gcc-bugs mailing list