File: enum1.c

package info (click to toggle)
llvm-toolchain-3.4 1%3A3.4.2-13
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 253,236 kB
  • ctags: 276,203
  • sloc: cpp: 1,665,580; ansic: 298,647; asm: 206,157; objc: 84,350; python: 73,119; sh: 23,466; perl: 5,679; makefile: 5,542; ml: 5,250; pascal: 2,467; lisp: 1,420; xml: 679; cs: 236; csh: 117
file content (42 lines) | stat: -rw-r--r-- 524 bytes parent folder | download | duplicates (41)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// Matching
enum E1 {
  E1Enumerator1,
  E1Enumerator2 = 3,
  E1Enumerator3
} x1;

// Value mismatch
enum E2 {
  E2Enumerator1,
  E2Enumerator2 = 3,
  E2Enumerator3
} x2;

// Name mismatch
enum E3 {
  E3Enumerator1,
  E3Enumerator2 = 3,
  E3Enumerator3
} x3;

// Missing enumerator
enum E4 {
  E4Enumerator1,
  E4Enumerator2,
  E4Enumerator3
} x4;

// Extra enumerator
enum E5 {
  E5Enumerator1,
  E5Enumerator2,
  E5Enumerator3
} x5;

// Matching, with typedef
typedef enum {
  E6Enumerator1,
  E6Enumerator2
} E6;

E6 x6;