This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Go patch committed: Avoid extra error for anonymous embedded type
- From: Ian Lance Taylor <iant at google dot com>
- To: gcc-patches at gcc dot gnu dot org, gofrontend-dev at googlegroups dot com
- Date: Thu, 10 Oct 2013 19:50:04 -0700
- Subject: Go patch committed: Avoid extra error for anonymous embedded type
- Authentication-results: sourceware.org; auth=none
This patch to the Go frontend avoids an extra error for an anonymous
embedded type. The compiler now checks for undefined types elsewhere,
and this error is unnecessary. Bootstrapped and ran Go testsuite on
x86_64-unknown-linux-gnu. Committed to mainline. Will commit to 4.8
branch when it reopens.
Ian
diff -r b8af1227bde7 go/types.cc
--- a/go/types.cc Thu Oct 10 17:45:24 2013 -0700
+++ b/go/types.cc Thu Oct 10 19:47:23 2013 -0700
@@ -4264,12 +4264,7 @@
++p)
{
Type* t = p->type();
- if (t->is_undefined())
- {
- error_at(p->location(), "struct field type is incomplete");
- p->set_type(Type::make_error_type());
- }
- else if (p->is_anonymous())
+ if (p->is_anonymous())
{
if (t->named_type() != NULL && t->points_to() != NULL)
{