Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(29)

Side by Side Diff: src/cmd/godefs/testdata.c

Issue 5256041: code review 5256041: godefs: add enum/const testdata (Closed)
Patch Set: diff -r 4f8aab94dfd3 https://go.googlecode.com/hg/ Created 13 years, 5 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/cmd/godefs/testdata_darwin_386.golden » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Go Authors. All rights reserved. 1 // Copyright 2011 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 #include <stdint.h> 5 #include <stdint.h>
6 6
7 // Issue 432 - enum fields in struct can cause misaligned struct fields 7 // Issue 432 - enum fields in struct can cause misaligned struct fields
8 typedef enum { 8 typedef enum {
9 a 9 a
10 } T1; 10 } T1;
(...skipping 20 matching lines...) Expand all
31 // Issue 1466 - forward references to types in stabs debug info were 31 // Issue 1466 - forward references to types in stabs debug info were
32 // always treated as enums 32 // always treated as enums
33 struct T4 {}; 33 struct T4 {};
34 34
35 struct T5 { 35 struct T5 {
36 struct T4 *a; 36 struct T4 *a;
37 }; 37 };
38 38
39 typedef struct T5 T5; 39 typedef struct T5 T5;
40 typedef struct T4 $T4; 40 typedef struct T4 $T4;
41 typedef T5 $T5; 41 typedef T5 $T5;
42
43 // Test constants and enumerations are printed correctly. clang/2.9 with·
44 // -O2 and above causes Bprint to print %#llx values incorrectly.
45 enum {
46 » $sizeofPtr = sizeof(void*),
47 » $sizeofShort = sizeof(short),
48 » $sizeofInt = sizeof(int),
49 » $sizeofLong = sizeof(long),
50 » $sizeofLongLong = sizeof(long long),
51 };
52
OLDNEW
« no previous file with comments | « no previous file | src/cmd/godefs/testdata_darwin_386.golden » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b