Quick Search:

View

Revision:
Expand:  
Changeset: MAIN:ragge:20120922150457

Diff

Diff from 1.6 to:

Annotations

Annotate by Age | Author | Mixed | None
/fisheye/browse/pcc/pcc-tests/regress/c99/types001.c

Annotated File View

faceless
1.1
1 /* C99 types */ 
plunky
1.5
2 int main(int argcchar *argv[])
faceless
1.1
3 {
4         _Bool b;
5
6         signed char s1
7         short int s2 ; 
8         int s3;
9         long int s4 ; 
10         long long int s5 ;
11
12         unsigned char u1
13         unsigned short int u2 ; 
14         unsigned int u3;
15         unsigned long int u4 ; 
16         unsigned long long int u5 ;
17
faceless
1.2
18         long long l1 ;
19
faceless
1.1
20         float f1
21         double f2;
22         long double f3
23
24         int T1[10];
25
26         struct {
27                 int a
28                 float b;
29                 long double c;
30         } st
31
32         union {
33                 int a ;
34                 float b
35                 long double c;
36         } un;
37
38         const int const1 ;
39         volatile int volatile1
40
41         if (sizeof(signed char) != sizeof(char))
42                 return 1 ; 
43         
44         if ((sizeof(s2) != sizeof(u2)) || 
45                  (sizeof(s3) != sizeof(u3)) || 
46                  (sizeof(s4) != sizeof(u4)) || 
47                  (sizeof(s5) != sizeof(u5)) )
48                 return 2 ;
ragge
1.6
49         if ((sizeof(f1) > sizeof (f2)) ||
50                  (sizeof(f2) > sizeof (f3)) )
faceless
1.1
51                 return 3 ;
52
ragge
1.4
53 #ifdef notdef
54         /* struct member alignments are target-dependent */
faceless
1.1
55         if (sizeof(st) != (sizeof(long double) + sizeof(float) + sizeof(int)))
56                 return 4
ragge
1.4
57 #endif
faceless
1.1
58         
59         if (sizeof(un) != sizeof(long double))
60                 return 5
61
62         return 0;
63
64 }
FishEye: Open Source License registered to PCC.
Your maintenance has expired. You can renew your license at http://www.atlassian.com/fisheye/renew
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-10-01 14:18 +0200