issue28721.go 506 B

1234567891011121314151617181920212223242526272829
  1. // Copyright 2018 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. // cgo should reject the use of mangled C names.
  5. package main
  6. /*
  7. typedef struct a {
  8. int i;
  9. } a;
  10. void fn(void) {}
  11. */
  12. import "C"
  13. type B _Ctype_struct_a // ERROR HERE
  14. var a _Ctype_struct_a // ERROR HERE
  15. type A struct {
  16. a *_Ctype_struct_a // ERROR HERE
  17. }
  18. var notExist _Ctype_NotExist // ERROR HERE
  19. func main() {
  20. _Cfunc_fn() // ERROR HERE
  21. }