From 79a3d239e99d8e60324701d313969cb6611bf308 Mon Sep 17 00:00:00 2001 From: Andy Maloney Date: Thu, 6 Aug 2015 11:45:53 -0400 Subject: [PATCH] cmd/cgo: change comments in generated C code to be C-style Change-Id: I3889eda72ae0f57117f1d4299e3574f8bf68be67 Reviewed-on: https://go-review.googlesource.com/13310 Reviewed-by: Ian Lance Taylor --- src/cmd/cgo/out.go | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/cmd/cgo/out.go b/src/cmd/cgo/out.go index 90a7441962..4a371fe702 100644 --- a/src/cmd/cgo/out.go +++ b/src/cmd/cgo/out.go @@ -1193,9 +1193,11 @@ func (p *Package) cgoType(e ast.Expr) *Type { } const gccProlog = ` -// Usual nonsense: if x and y are not equal, the type will be invalid -// (have a negative array count) and an inscrutable error will come -// out of the compiler and hopefully mention "name". +/* + If x and y are not equal, the type will be invalid + (have a negative array count) and an inscrutable error will come + out of the compiler and hopefully mention "name". +*/ #define __cgo_compile_assert_eq(x, y, name) typedef char name[(x-y)*(x-y)*-2+1]; // Check at compile time that the sizes we use match our expectations. @@ -1376,8 +1378,10 @@ typedef double GoFloat64; typedef __complex float GoComplex64; typedef __complex double GoComplex128; -// static assertion to make sure the file is being used on architecture -// at least with matching size of GoInt. +/* + static assertion to make sure the file is being used on architecture + at least with matching size of GoInt. +*/ typedef char _check_for_GOINTBITS_bit_pointer_matching_GoInt[sizeof(void*)==GOINTBITS/8 ? 1:-1]; typedef struct { char *p; GoInt n; } GoString; -- 2.48.1