This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/71193] New: [6/7 Regression] error: invalid use of incomplete type
- From: "marxin at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 19 May 2016 10:08:10 +0000
- Subject: [Bug c++/71193] New: [6/7 Regression] error: invalid use of incomplete type
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71193
Bug ID: 71193
Summary: [6/7 Regression] error: invalid use of incomplete type
Product: gcc
Version: 7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: marxin at gcc dot gnu.org
Target Milestone: ---
Hello.
Starting from r236221, we report a new error for the following snippet (reduced
from Chromium):
$ cat tc.ii
class Heap;
class A {
public:
Heap *m_fn1();
};
template <typename> class B : A {
void m_fn2() { m_fn1()->HashSeed; }
};
$ g++ tc.ii
tc.ii: In member function âvoid B< <template-parameter-1-1> >::m_fn2()â:
tc.ii:7:25: error: invalid use of incomplete type âclass Heapâ
void m_fn2() { m_fn1()->HashSeed; }
^~
tc.ii:1:7: note: forward declaration of âclass Heapâ
class Heap;
^~~~
GCC 5.3.1 works fine, as well as clang++ 3.7.0
Thanks,
Martin