From 3ffd29fb2cfeee77c7f58fcae3496665695eb938 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Fri, 3 Oct 2014 12:44:20 -0400 Subject: cmd/cc, runtime: disallow structs without tags Structs without tags have no unique name to use in the Go definitions generated from the C types. This caused issue 8812, fixed by CL 149260043. Avoid future problems by requiring struct tags. Update runtime as needed. (There is no other C code in the tree.) LGTM=bradfitz, iant R=golang-codereviews, bradfitz, dave, iant CC=golang-codereviews, khr, r https://golang.org/cl/150360043 --- src/runtime/runtime.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/runtime/runtime.h') diff --git a/src/runtime/runtime.h b/src/runtime/runtime.h index aa300d7bb8..c4d8786089 100644 --- a/src/runtime/runtime.h +++ b/src/runtime/runtime.h @@ -384,11 +384,11 @@ struct M // these are here because they are too large to be on the stack // of low-level NOSPLIT functions. LibCall libcall; - struct { + struct MTs { int64 tv_sec; int64 tv_nsec; } ts; - struct { + struct MScratch { uintptr v[6]; } scratch; #endif -- cgit v1.3