~john-koepi/ubuntu/trusty/golang/default

« back to all changes in this revision

Viewing changes to src/cmd/godefs/testdata.c

  • Committer: Bazaar Package Importer
  • Author(s): Ondřej Surý
  • Date: 2011-08-03 17:04:59 UTC
  • mfrom: (14.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20110803170459-wzd99m3567y80ila
Tags: 1:59-1
* Imported Upstream version 59
* Refresh patches to a new release
* Fix FTBFS on ARM (Closes: #634270)
* Update version.bash to work with Debian packaging and not hg
  repository

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright 2011 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
 
 
5
#include <stdint.h>
 
6
 
 
7
// Issue 432 - enum fields in struct can cause misaligned struct fields
 
8
typedef enum {
 
9
        a
 
10
} T1;
 
11
 
 
12
struct T2 {
 
13
        uint8_t a;
 
14
        T1 b;
 
15
        T1 c;
 
16
        uint16_t d;
 
17
};
 
18
 
 
19
typedef struct T2 T2;
 
20
typedef T2 $T2;
 
21
 
 
22
// Issue 1162 - structs with fields named Pad[0-9]+ conflict with field
 
23
// names used by godefs for padding
 
24
struct T3 {
 
25
        uint8_t a;
 
26
        int Pad0;
 
27
};
 
28
 
 
29
typedef struct T3 $T3;
 
30
 
 
31
// Issue 1466 - forward references to types in stabs debug info were
 
32
// always treated as enums
 
33
struct T4 {};
 
34
 
 
35
struct T5 {
 
36
        struct T4 *a;
 
37
};
 
38
 
 
39
typedef struct T5 T5;
 
40
typedef struct T4 $T4;
 
41
typedef T5 $T5;
 
 
b'\\ No newline at end of file'