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++/82029] New: [8 Regression] bogus error: ‘__PRETTY_FUNCTION__’ was not declared in this scope


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__; };
          ^~~~~~~~~~~~~~~~~~~

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