This is the mail archive of the gcc-patches@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]

Go patch committed: Avoid extra error for anonymous embedded type


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)
 	    {

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