@ -1,5 +0,0 @@ | |||||
int | |||||
main() | |||||
{ | |||||
return 0; | |||||
} |
@ -1,5 +0,0 @@ | |||||
int | |||||
main() | |||||
{ | |||||
return 3-3; | |||||
} |
@ -1,8 +0,0 @@ | |||||
int | |||||
main() | |||||
{ | |||||
int x; | |||||
x = 4; | |||||
return x - 4; | |||||
} |
@ -1,12 +0,0 @@ | |||||
int | |||||
main() | |||||
{ | |||||
int x; | |||||
int *p; | |||||
x = 4; | |||||
p = &x; | |||||
*p = 0; | |||||
return *p; | |||||
} |
@ -1,23 +0,0 @@ | |||||
int | |||||
main() | |||||
{ | |||||
int x; | |||||
int *p; | |||||
int **pp; | |||||
x = 0; | |||||
p = &x; | |||||
pp = &p; | |||||
if(*p) | |||||
return 1; | |||||
if(**pp) | |||||
return 1; | |||||
else | |||||
**pp = 1; | |||||
if(x) | |||||
return 0; | |||||
else | |||||
return 1; | |||||
} |
@ -1,10 +0,0 @@ | |||||
int | |||||
main() | |||||
{ | |||||
int x; | |||||
x = 50; | |||||
while (x) | |||||
x = x - 1; | |||||
return x; | |||||
} |
@ -1,15 +0,0 @@ | |||||
int | |||||
main() | |||||
{ | |||||
int x; | |||||
x = 1; | |||||
for(x = 10; x; x = x - 1) | |||||
; | |||||
if(x) | |||||
return 1; | |||||
x = 10; | |||||
for (;x;) | |||||
x = x - 1; | |||||
return x; | |||||
} |
@ -1,11 +0,0 @@ | |||||
int | |||||
main() | |||||
{ | |||||
int x; | |||||
x = 50; | |||||
do | |||||
x = x - 1; | |||||
while(x); | |||||
return x; | |||||
} |
@ -1,11 +0,0 @@ | |||||
int | |||||
main() | |||||
{ | |||||
int x; | |||||
x = 1; | |||||
x = x * 10; | |||||
x = x / 2; | |||||
x = x % 3; | |||||
return x - 2; | |||||
} |
@ -1,13 +0,0 @@ | |||||
int | |||||
main() | |||||
{ | |||||
start: | |||||
goto next; | |||||
return 1; | |||||
success: | |||||
return 0; | |||||
next: | |||||
foo: | |||||
goto success; | |||||
return 1; | |||||
} |
@ -1,8 +0,0 @@ | |||||
int | |||||
main() | |||||
{ | |||||
int x; | |||||
int y; | |||||
x = y = 0; | |||||
return x; | |||||
} |
@ -1,5 +0,0 @@ | |||||
int | |||||
main() | |||||
{ | |||||
return (2 + 2) * 2 - 8; | |||||
} |
@ -1,10 +0,0 @@ | |||||
int | |||||
main() | |||||
{ | |||||
int x; | |||||
int *p; | |||||
x = 0; | |||||
p = &x; | |||||
return p[0]; | |||||
} |
@ -1,11 +0,0 @@ | |||||
int | |||||
main() | |||||
{ | |||||
int x; | |||||
int *p; | |||||
x = 1; | |||||
p = &x; | |||||
p[0] = 0; | |||||
return x; | |||||
} |
@ -1,10 +0,0 @@ | |||||
int | |||||
main() | |||||
{ | |||||
int arr[2]; | |||||
arr[0] = 1; | |||||
arr[1] = 2; | |||||
return arr[0] + arr[1] - 3; | |||||
} |
@ -1,10 +0,0 @@ | |||||
int | |||||
main() | |||||
{ | |||||
int arr[2]; | |||||
int *p; | |||||
p = &arr[1]; | |||||
*p = 0; | |||||
return arr[1]; | |||||
} |
@ -1,9 +0,0 @@ | |||||
int | |||||
main() | |||||
{ | |||||
struct { int x; int y; } s; | |||||
s.x = 3; | |||||
s.y = 5; | |||||
return s.y - s.x - 2; | |||||
} |
@ -1,13 +0,0 @@ | |||||
int | |||||
main() | |||||
{ | |||||
struct S { int x; int y; } s; | |||||
struct S *p; | |||||
p = &s; | |||||
s.x = 1; | |||||
p->y = 2; | |||||
return p->y + p->x - 3; | |||||
} | |||||
@ -1,10 +0,0 @@ | |||||
int | |||||
main() | |||||
{ | |||||
struct S { struct S *p; int x; } s; | |||||
s.x = 0; | |||||
s.p = &s; | |||||
return s.p->p->p->p->p->x; | |||||
} | |||||
@ -1,10 +0,0 @@ | |||||
int | |||||
main() | |||||
{ | |||||
int x, *p, **pp; | |||||
x = 0; | |||||
p = &x; | |||||
pp = &p; | |||||
return **pp; | |||||
} |
@ -1,12 +0,0 @@ | |||||
int | |||||
foo(int a, int b) | |||||
{ | |||||
return 2 + a - b; | |||||
} | |||||
int | |||||
main() | |||||
{ | |||||
return foo(1, 3); | |||||
} | |||||
@ -1,10 +0,0 @@ | |||||
typedef int x; | |||||
int | |||||
main() | |||||
{ | |||||
x v; | |||||
v = 0; | |||||
return v; | |||||
} | |||||
@ -1,9 +0,0 @@ | |||||
int x; | |||||
int | |||||
main() | |||||
{ | |||||
x = 0; | |||||
return x; | |||||
} | |||||
@ -1,12 +0,0 @@ | |||||
typedef struct { int x; int y; } s; | |||||
s v; | |||||
int | |||||
main() | |||||
{ | |||||
v.x = 1; | |||||
v.y = 2; | |||||
return 3 - v.x - v.y; | |||||
} | |||||
@ -1,10 +0,0 @@ | |||||
int strlen(char *); | |||||
int | |||||
main() | |||||
{ | |||||
char *p; | |||||
p = "hello"; | |||||
return strlen(p) - 5; | |||||
} |
@ -1,8 +0,0 @@ | |||||
int | |||||
main() | |||||
{ | |||||
char *p; | |||||
p = "hello"; | |||||
return p[0] - 104; | |||||
} |
@ -1,10 +0,0 @@ | |||||
int | |||||
main() | |||||
{ | |||||
int x; | |||||
x = 1; | |||||
x = x | 4; | |||||
return x - 5; | |||||
} | |||||
@ -1,10 +0,0 @@ | |||||
int | |||||
main() | |||||
{ | |||||
int x; | |||||
x = 1; | |||||
x = x & 3; | |||||
return x - 1; | |||||
} | |||||
@ -1,10 +0,0 @@ | |||||
int | |||||
main() | |||||
{ | |||||
int x; | |||||
x = 1; | |||||
x = x ^ 3; | |||||
return x - 2; | |||||
} | |||||
@ -1,24 +0,0 @@ | |||||
int | |||||
f() | |||||
{ | |||||
return 100; | |||||
} | |||||
int | |||||
main() | |||||
{ | |||||
if (f() > 1000) | |||||
return 1; | |||||
if (f() >= 1000) | |||||
return 1; | |||||
if (1000 < f()) | |||||
return 1; | |||||
if (1000 <= f()) | |||||
return 1; | |||||
if (1000 == f()) | |||||
return 1; | |||||
if (100 != f()) | |||||
return 1; | |||||
return 0; | |||||
} | |||||
@ -1,48 +0,0 @@ | |||||
int | |||||
zero() | |||||
{ | |||||
return 0; | |||||
} | |||||
int | |||||
one() | |||||
{ | |||||
return 1; | |||||
} | |||||
int | |||||
main() | |||||
{ | |||||
int x; | |||||
int y; | |||||
x = zero(); | |||||
y = ++x; | |||||
if (x != 1) | |||||
return 1; | |||||
if (y != 1) | |||||
return 1; | |||||
x = one(); | |||||
y = --x; | |||||
if (x != 0) | |||||
return 1; | |||||
if (y != 0) | |||||
return 1; | |||||
x = zero(); | |||||
y = x++; | |||||
if (x != 1) | |||||
return 1; | |||||
if (y != 0) | |||||
return 1; | |||||
x = one(); | |||||
y = x--; | |||||
if (x != 0) | |||||
return 1; | |||||
if (y != 1) | |||||
return 1; | |||||
return 0; | |||||
} |
@ -1,30 +0,0 @@ | |||||
int | |||||
main() | |||||
{ | |||||
int arr[2]; | |||||
int *p; | |||||
arr[0] = 2; | |||||
arr[1] = 3; | |||||
p = &arr[0]; | |||||
if(*(p++) != 2) | |||||
return 1; | |||||
if(*(p++) != 3) | |||||
return 2; | |||||
p = &arr[1]; | |||||
if(*(p--) != 3) | |||||
return 1; | |||||
if(*(p--) != 2) | |||||
return 2; | |||||
p = &arr[0]; | |||||
if(*(++p) != 3) | |||||
return 1; | |||||
p = &arr[1]; | |||||
if(*(--p) != 2) | |||||
return 1; | |||||
return 0; | |||||
} |
@ -1,45 +0,0 @@ | |||||
int g; | |||||
int | |||||
effect() | |||||
{ | |||||
g = 1; | |||||
return 1; | |||||
} | |||||
int | |||||
main() | |||||
{ | |||||
int x; | |||||
g = 0; | |||||
x = 0; | |||||
if(x && effect()) | |||||
return 1; | |||||
if(g) | |||||
return 2; | |||||
x = 1; | |||||
if(x && effect()) { | |||||
if(g != 1) | |||||
return 3; | |||||
} else { | |||||
return 4; | |||||
} | |||||
g = 0; | |||||
x = 1; | |||||
if(x || effect()) { | |||||
if(g) | |||||
return 5; | |||||
} else { | |||||
return 6; | |||||
} | |||||
x = 0; | |||||
if(x || effect()) { | |||||
if(g != 1) | |||||
return 7; | |||||
} else { | |||||
return 8; | |||||
} | |||||
return 0; | |||||
} | |||||
@ -1,32 +0,0 @@ | |||||
int | |||||
main() | |||||
{ | |||||
int x; | |||||
x = 0; | |||||
while(1) | |||||
break; | |||||
while(1) { | |||||
if (x == 5) { | |||||
break; | |||||
} | |||||
x = x + 1; | |||||
continue; | |||||
} | |||||
for (;;) { | |||||
if (x == 10) { | |||||
break; | |||||
} | |||||
x = x + 1; | |||||
continue; | |||||
} | |||||
do { | |||||
if (x == 15) { | |||||
break; | |||||
} | |||||
x = x + 1; | |||||
continue; | |||||
} while(1); | |||||
return x - 15; | |||||
} | |||||
@ -1,15 +0,0 @@ | |||||
int | |||||
main() | |||||
{ | |||||
int x; | |||||
x = 4; | |||||
if(!x != 0) | |||||
return 1; | |||||
if(!!x != 1) | |||||
return 1; | |||||
if(-x != 0 - 4) | |||||
return 1; | |||||
return 0; | |||||
} | |||||
@ -1,19 +0,0 @@ | |||||
int | |||||
main() | |||||
{ | |||||
int x; | |||||
x = 0; | |||||
x += 2; | |||||
x += 2; | |||||
if (x != 4) | |||||
return 1; | |||||
x -= 1; | |||||
if (x != 3) | |||||
return 2; | |||||
x *= 2; | |||||
if (x != 6) | |||||
return 3; | |||||
return 0; | |||||
} |
@ -1,17 +0,0 @@ | |||||
int | |||||
main() | |||||
{ | |||||
int x[2]; | |||||
int *p; | |||||
x[1] = 7; | |||||
p = &x[0]; | |||||
p = p + 1; | |||||
if(*p != 7) | |||||
return 1; | |||||
if(&x[1] - &x[0] != 1) | |||||
return 1; | |||||
return 0; | |||||
} |
@ -1,17 +0,0 @@ | |||||
int | |||||
main() | |||||
{ | |||||
int x, *p; | |||||
if (sizeof(0) < 2) | |||||
return 1; | |||||
if (sizeof 0 < 2) | |||||
return 1; | |||||
if (sizeof(char) < 1) | |||||
return 1; | |||||
if (sizeof(int) - 2 < 0) | |||||
return 1; | |||||
if (sizeof(&x) != sizeof p) | |||||
return 1; | |||||
return 0; | |||||
} |
@ -1,13 +0,0 @@ | |||||
int | |||||
main() | |||||
{ | |||||
void *p; | |||||
int x; | |||||
x = 2; | |||||
p = &x; | |||||
if(*((int*)p) != 2) | |||||
return 1; | |||||
return 0; | |||||
} |
@ -1,55 +0,0 @@ | |||||
#include <stdlib.h> | |||||
int N; | |||||
int *t; | |||||
int | |||||
chk(int x, int y) | |||||
{ | |||||
int i; | |||||
int r; | |||||
for (r=i=0; i<8; i++) { | |||||
r = r + t[x + 8*i]; | |||||
r = r + t[i + 8*y]; | |||||
if (x+i < 8 & y+i < 8) | |||||
r = r + t[x+i + 8*(y+i)]; | |||||
if (x+i < 8 & y-i >= 0) | |||||
r = r + t[x+i + 8*(y-i)]; | |||||
if (x-i >= 0 & y+i < 8) | |||||
r = r + t[x-i + 8*(y+i)]; | |||||
if (x-i >= 0 & y-i >= 0) | |||||
r = r + t[x-i + 8*(y-i)]; | |||||
} | |||||
return r; | |||||
} | |||||
int | |||||
go(int n, int x, int y) | |||||
{ | |||||
if (n == 8) { | |||||
N++; | |||||
return 0; | |||||
} | |||||
for (; y<8; y++) { | |||||
for (; x<8; x++) | |||||
if (chk(x, y) == 0) { | |||||
t[x + 8*y]++; | |||||
go(n+1, x, y); | |||||
t[x + 8*y]--; | |||||
} | |||||
x = 0; | |||||
} | |||||
return 0; | |||||
} | |||||
int | |||||
main() | |||||
{ | |||||
t = calloc(64, sizeof(int)); | |||||
go(0, 0, 0); | |||||
if(N != 92) | |||||
return 1; | |||||
return 0; | |||||
} | |||||
@ -1,26 +0,0 @@ | |||||
int | |||||
main() { | |||||
int n; | |||||
int t; | |||||
int c; | |||||
int p; | |||||
c = 0; | |||||
n = 2; | |||||
while (n < 5000) { | |||||
t = 2; | |||||
p = 1; | |||||
while (t*t <= n) { | |||||
if (n % t == 0) | |||||
p = 0; | |||||
t++; | |||||
} | |||||
n++; | |||||
if (p) | |||||
c++; | |||||
} | |||||
if (c != 669) | |||||
return 1; | |||||
return 0; | |||||
} | |||||
@ -1,11 +0,0 @@ | |||||
int | |||||
main() | |||||
{ | |||||
union { int a; int b; } u; | |||||
u.a = 1; | |||||
u.b = 3; | |||||
if (u.a != 3 || u.b != 3) | |||||
return 1; | |||||
return 0; | |||||
} |
@ -1,19 +0,0 @@ | |||||
struct s { | |||||
int x; | |||||
struct { | |||||
int y; | |||||
int z; | |||||
} nest; | |||||
}; | |||||
int | |||||
main() { | |||||
struct s v; | |||||
v.x = 1; | |||||
v.nest.y = 2; | |||||
v.nest.z = 3; | |||||
if (v.x + v.nest.y + v.nest.z != 6) | |||||
return 1; | |||||
return 0; | |||||
} | |||||
@ -1,16 +0,0 @@ | |||||
struct T; | |||||
struct T { | |||||
int x; | |||||
}; | |||||
int | |||||
main() | |||||
{ | |||||
struct T v; | |||||
{ struct T { int z; }; } | |||||
v.x = 2; | |||||
if(v.x != 2) | |||||
return 1; | |||||
return 0; | |||||
} |
@ -1,16 +0,0 @@ | |||||
int x = 5; | |||||
long y = 6; | |||||
int *p = &x; | |||||
int | |||||
main() | |||||
{ | |||||
if (x != 5) | |||||
return 1; | |||||
if (y != 6) | |||||
return 2; | |||||
if (*p != 5) | |||||
return 3; | |||||
return 0; | |||||
} | |||||
@ -1,33 +0,0 @@ | |||||
typedef struct { | |||||
int a; | |||||
union { | |||||
int b1; | |||||
int b2; | |||||
}; | |||||
struct { union { struct { int c; }; }; }; | |||||
struct { | |||||
int d; | |||||
}; | |||||
} s; | |||||
int | |||||
main() | |||||
{ | |||||
s v; | |||||
v.a = 1; | |||||
v.b1 = 2; | |||||
v.c = 3; | |||||
v.d = 4; | |||||
if (v.a != 1) | |||||
return 1; | |||||
if (v.b1 != 2 && v.b2 != 2) | |||||
return 2; | |||||
if (v.c != 3) | |||||
return 3; | |||||
if (v.d != 4) | |||||
return 4; | |||||
return 0; | |||||
} |
@ -1,14 +0,0 @@ | |||||
struct { int a; int b; int c; } s = {1, 2, 3}; | |||||
int | |||||
main() | |||||
{ | |||||
if (s.a != 1) | |||||
return 1; | |||||
if (s.b != 2) | |||||
return 2; | |||||
if (s.c != 3) | |||||
return 3; | |||||
return 0; | |||||
} |
@ -1,12 +0,0 @@ | |||||
struct S {int a; int b;}; | |||||
struct S s = { .b = 2, .a = 1}; | |||||
int | |||||
main() | |||||
{ | |||||
if(s.a != 1) | |||||
return 1; | |||||
if(s.b != 2) | |||||
return 2; | |||||
return 0; | |||||
} |
@ -1,14 +0,0 @@ | |||||
int x = 10; | |||||
struct S {int a; int *p;}; | |||||
struct S s = { .p = &x, .a = 1}; | |||||
int | |||||
main() | |||||
{ | |||||
if(s.a != 1) | |||||
return 1; | |||||
if(*s.p != 10) | |||||
return 2; | |||||
return 0; | |||||
} |
@ -1,33 +0,0 @@ | |||||
struct S1 { | |||||
int a; | |||||
int b; | |||||
}; | |||||
struct S2 { | |||||
int a; | |||||
int b; | |||||
union { | |||||
int c; | |||||
int d; | |||||
}; | |||||
struct S1 s; | |||||
}; | |||||
struct S2 v = {1, 2, 3, {4, 5}}; | |||||
int | |||||
main() | |||||
{ | |||||
if(v.a != 1) | |||||
return 1; | |||||
if(v.b != 2) | |||||
return 2; | |||||
if(v.c != 3 || v.d != 3) | |||||
return 3; | |||||
if(v.s.a != 4) | |||||
return 4; | |||||
if(v.s.b != 5) | |||||
return 5; | |||||
return 0; | |||||
} |
@ -1,38 +0,0 @@ | |||||
int x = 0; | |||||
int | |||||
main() | |||||
{ | |||||
switch(x) | |||||
case 0: | |||||
; | |||||
switch(x) | |||||
case 0: | |||||
switch(x) { | |||||
case 0: | |||||
goto next; | |||||
default: | |||||
return 1; | |||||
} | |||||
return 1; | |||||
next: | |||||
switch(x) | |||||
case 1: | |||||
return 1; | |||||
switch(x) { | |||||
{ | |||||
x = 1 + 1; | |||||
foo: | |||||
case 1: | |||||
return 1; | |||||
} | |||||
} | |||||
switch(x) { | |||||
case 0: | |||||
return x; | |||||
case 1: | |||||
return 1; | |||||
default: | |||||
return 1; | |||||
} | |||||
} |
@ -1,10 +0,0 @@ | |||||
int | |||||
main() | |||||
{ | |||||
struct T { int x; }; | |||||
{ | |||||
struct T s; | |||||
s.x = 0; | |||||
return s.x; | |||||
} | |||||
} |
@ -1,13 +0,0 @@ | |||||
int | |||||
main() | |||||
{ | |||||
struct T { int x; } s1; | |||||
s1.x = 1; | |||||
{ | |||||
struct T { int y; } s2; | |||||
s2.y = 1; | |||||
if (s1.x - s2.y != 0) | |||||
return 1; | |||||
} | |||||
return 0; | |||||
} |
@ -1,22 +0,0 @@ | |||||
enum E { | |||||
x, | |||||
y, | |||||
z, | |||||
}; | |||||
int | |||||
main() | |||||
{ | |||||
enum E e; | |||||
if(x != 0) | |||||
return 1; | |||||
if(y != 1) | |||||
return 2; | |||||
if(z != 2) | |||||
return 3; | |||||
e = x; | |||||
return e; | |||||
} | |||||
@ -1,22 +0,0 @@ | |||||
enum E { | |||||
x, | |||||
y = 2, | |||||
z, | |||||
}; | |||||
int | |||||
main() | |||||
{ | |||||
enum E e; | |||||
if(x != 0) | |||||
return 1; | |||||
if(y != 2) | |||||
return 2; | |||||
if(z != 3) | |||||
return 3; | |||||
e = x; | |||||
return e; | |||||
} | |||||
@ -1,18 +0,0 @@ | |||||
#include <stdio.h> | |||||
int main() | |||||
{ | |||||
int a; | |||||
a = 42; | |||||
printf("%d\n", a); | |||||
int b = 64; | |||||
printf("%d\n", b); | |||||
int c = 12, d = 34; | |||||
printf("%d, %d\n", c, d); | |||||
return 0; | |||||
} | |||||
// vim: set expandtab ts=4 sw=3 sts=3 tw=80 : |
@ -1,9 +0,0 @@ | |||||
int | |||||
main() | |||||
{ | |||||
char a[16], b[16]; | |||||
if(sizeof(a) != sizeof(b)) | |||||
return 1; | |||||
return 0; | |||||
} |
@ -1,15 +0,0 @@ | |||||
int main() | |||||
{ | |||||
char * s; | |||||
s = "abc" "def"; | |||||
if(s[0] != 'a') return 1; | |||||
if(s[1] != 'b') return 2; | |||||
if(s[2] != 'c') return 3; | |||||
if(s[3] != 'd') return 4; | |||||
if(s[4] != 'e') return 5; | |||||
if(s[5] != 'f') return 6; | |||||
if(s[6] != 0) return 7; | |||||
return 0; | |||||
} |
@ -1,8 +0,0 @@ | |||||
int | |||||
main() | |||||
{ | |||||
if ('a' != 97) | |||||
return 1; | |||||
return 0; | |||||
} |
@ -1,11 +0,0 @@ | |||||
// line comment | |||||
int | |||||
main() | |||||
{ | |||||
/* | |||||
multiline | |||||
comment | |||||
*/ | |||||
return 0; | |||||
} |
@ -1,7 +0,0 @@ | |||||
#define FOO 0 | |||||
int main() | |||||
{ | |||||
return FOO; | |||||
} | |||||
@ -1,5 +0,0 @@ | |||||
func (x, y) { | |||||
int x, y; // ‘x’ redeclared as different kind of symbol / ‘y’ redeclared as different kind of symbol | |||||
return x+y; | |||||
} | |||||
@ -1,18 +0,0 @@ | |||||
typedef void *PyObject; | |||||
int | |||||
PyMapping_SetItemString(o, key, value) | |||||
PyObject *o; | |||||
char *key; | |||||
PyObject *value; | |||||
{ | |||||
PyObject *okey; | |||||
int r; | |||||
if( ! key) return Py_ReturnNullError(),-1; | |||||
if (!(okey=PyString_FromString(key))) return -1; | |||||
r = PyObject_SetItem(o,okey,value); | |||||
if (--( okey )->ob_refcnt != 0) ; else (*( okey )->ob_type->tp_dealloc)((PyObject *)( okey )) ; // (1)request for member ‘ob_refcnt’ in something not a structure or union / (2)request for member ‘ob_type’ in something not a structure or union | |||||
// ^(1) ^(2) | |||||
return r; | |||||
} |
@ -1,6 +0,0 @@ | |||||
void F(char l) | |||||
{ | |||||
return l<= '\~'; // ‘return’ with a value, in function returning void / unknown escape sequence: '\~' | |||||
} | |||||
@ -1,19 +0,0 @@ | |||||
int foo(); | |||||
int abs; | |||||
int main() { | |||||
abs = ({ | |||||
__label__ hey, now; | |||||
int y = foo (); | |||||
int z; | |||||
void *it; | |||||
it = &&hey; | |||||
hey: if (y > 0) z = y; | |||||
else z = - y; | |||||
z; | |||||
}); | |||||
} | |||||
@ -1,8 +0,0 @@ | |||||
foo (double a, double b) | |||||
{ | |||||
auto double square (double z); | |||||
double square (double z) { return z * z; } | |||||
return square (a) + square (b); | |||||
} | |||||
@ -1,7 +0,0 @@ | |||||
main() { | |||||
int a; | |||||
//typedef b = (a); | |||||
typeof (int *) c; | |||||
typeof (d[0](1)) e; | |||||
c = &a; | |||||
} |
@ -1,5 +0,0 @@ | |||||
hey() { | |||||
int x,y,z; | |||||
z= x ? : y; | |||||
} | |||||
@ -1,11 +0,0 @@ | |||||
heynow() { | |||||
long long int x = 10LL; | |||||
unsigned long long int y = 9ULL; | |||||
__complex__ float c, d, e; | |||||
float f; | |||||
c = 10.0 + 3.0fi; | |||||
d = ~ c; | |||||
f = __real__ c; | |||||
f = __imag__ d; | |||||
} | |||||
@ -1,7 +0,0 @@ | |||||
concat_fopen (char *s1, char *s2, char *mode) | |||||
{ | |||||
char str[strlen (s1) + strlen (s2) + 1]; | |||||
strcpy (str, s1); | |||||
strcat (str, s2); | |||||
return fopen (str, mode); | |||||
} |
@ -1,15 +0,0 @@ | |||||
heynow() { | |||||
struct foo {int a; char b[2];} structure; | |||||
char **foo1 = (char *[]) { "x", "y", "z" }; | |||||
structure = ((struct foo) {x + y, 'a', 0}); | |||||
{ | |||||
struct foo temp = {x + y, 'a', 0}; | |||||
structure = temp; | |||||
} | |||||
output = ((int[]) { 2, x, 28 }) [input]; | |||||
} | |||||
@ -1,23 +0,0 @@ | |||||
aikoAllDay() { | |||||
int a[6] = { [4] 29, [2] = 15 }; | |||||
int ab[6] = { 0, 0, 15, 0, 29, 0 }; | |||||
int widths[] = { [0 ... 9] = 1, [10 ... 99] = 2, [100] = 3 }; | |||||
int xvalue, yvalue, v1, v2, v4; | |||||
struct point { int x, y; }; | |||||
struct point p = { xvalue, yvalue }; | |||||
struct point p = { y: yvalue, x: xvalue }; | |||||
struct point p = { .y = yvalue, .x = xvalue }; | |||||
union foo { int i; double d; }; | |||||
union foo f = { d: 4 }; | |||||
int a[6] = { [1] = v1, v2, [4] = v4 }; | |||||
int a[6] = { 0, v1, v2, 0, v4, 0 }; | |||||
int whitespace[256] | |||||
= { [' '] = 1, ['\t'] = 1, ['\h'] = 1, | |||||
['\f'] = 1, ['\n'] = 1, ['\r'] = 1 }; | |||||
fn(1,2,3); | |||||
} | |||||
@ -1,17 +0,0 @@ | |||||
struct foo {int a[5];} ; | |||||
struct foo f(); | |||||
inline int bar (int index) { | |||||
int c; | |||||
enum blah; | |||||
c = __alignof(foo.a); | |||||
c = __alignof(unsigned long int); | |||||
switch (index) { | |||||
case 'a'...'z': | |||||
break; | |||||
} | |||||
return f().a[index]; | |||||
} | |||||
@ -1,77 +0,0 @@ | |||||
void fatal () __attribute__ ((noreturn)); | |||||
typedef void voidfn (); | |||||
volatile voidfn fatal; | |||||
int square (int) __attribute__ ((const)); | |||||
typedef int intfn (); | |||||
extern const intfn square; | |||||
extern int | |||||
my_printf (void *my_object, const char *my_format, ...) | |||||
__attribute__ ((format (printf, 2, 3))); | |||||
extern char * | |||||
my_dgettext (char *my_domain, const char *my_format) | |||||
__attribute__ ((format_arg (2))); | |||||
extern void foobar (void) __attribute__ ((section ("bar"))); | |||||
void __f () { /* do something */; } | |||||
void f () __attribute__ ((weak, alias ("__f"))); | |||||
int x __attribute__ ((aligned (16), packed)) = 0; | |||||
struct foo { int x[2] __attribute__ ((aligned (8))); }; | |||||
short array[3] __attribute__ ((aligned)); | |||||
struct foo1 | |||||
{ | |||||
char a; | |||||
int x[2] __attribute__ ((packed)); | |||||
}; | |||||
struct duart a __attribute__ ((section ("DUART_A"))) = { 0 }; | |||||
struct duart b __attribute__ ((section ("DUART_B"))) = { 0 }; | |||||
char stack[10000] __attribute__ ((section ("STACK"))) = { 0 }; | |||||
int init_data __attribute__ ((section ("INITDATA"))) = 0; | |||||
struct S { short f[3]; } __attribute__ ((aligned (8))); | |||||
typedef int more_aligned_int __attribute__ ((aligned (8))); | |||||
union wait { int a, __ip; }; | |||||
typedef int pid_t; | |||||
typedef union | |||||
{ | |||||
int *__ip; | |||||
union wait *__up; | |||||
} wait_status_ptr_t __attribute__ ((__transparent_union__)); | |||||
pid_t wait (wait_status_ptr_t); | |||||
int w1 () { int w; return wait (&w); } | |||||
int w2 () { union wait w; return wait (&w); } | |||||
pid_t wait (wait_status_ptr_t p) | |||||
{ | |||||
return waitpid (-1, p.__ip, 0); | |||||
} | |||||
main() | |||||
{ | |||||
/* Initialize stack pointer */ | |||||
init_sp (stack + sizeof (stack)); | |||||
/* Initialize initialized data */ | |||||
memcpy (&init_data, &data, &edata - &data); | |||||
/* Turn on the serial ports */ | |||||
init_duart (&a); | |||||
init_duart (&b); | |||||
} |
@ -1,3 +0,0 @@ | |||||
int foo asm ("myfoo") = 2; | |||||
extern func () asm ("FUNC"); |
@ -1,30 +0,0 @@ | |||||
fn() { | |||||
asm ("fsinx %1,%0" : "=f" (result) : "f" (angle)); | |||||
asm ("combine %2,%0" : "=r" (foo) : "0" (foo), "g" (bar)); | |||||
asm ("combine %2,%0" : "=r" (foo) : "r" (foo), "g" (bar)); | |||||
asm volatile ("movc3 %0,%1,%2" | |||||
: /* no outputs */ | |||||
: "g" (from), "g" (to), "g" (count) | |||||
: "r0", "r1", "r2", "r3", "r4", "r5"); | |||||
asm ("movl %0,r9;movl %1,r10;call _foo" | |||||
: /* no outputs */ | |||||
: "g" (from), "g" (to) | |||||
: "r9", "r10"); | |||||
asm ("clr %0;frob %1;beq 0f;mov #1,%0;0:" | |||||
: "g" (result) | |||||
: "g" (input)); | |||||
{ double __value, __arg = (x); | |||||
asm ("fsinx %1,%0": "=f" (__value): "f" (__arg)); | |||||
__value; } | |||||
{ int __old; | |||||
asm volatile ("get_and_set_priority %0, %1": "=g" (__old) : "g" (new)); | |||||
__old; } | |||||
} | |||||
@ -1,8 +0,0 @@ | |||||
// C++ comment | |||||
int f$; | |||||
tester (int len; char data[len][len], int len) { | |||||
} | |||||
@ -1,23 +0,0 @@ | |||||
typedef struct a { | |||||
int b; | |||||
} c,*d; | |||||
extern int execv(const char *, char *const []); | |||||
int b; | |||||
int a = b = 1; | |||||
static char *predefs = "whatever \ | |||||
more "; | |||||
char *temporary_firstobj = | |||||
(char *) __extension__ | |||||
({ struct obstack *__h = ( &temporary_obstack ); | |||||
__extension__ ({ struct obstack *__o = ( __h ); | |||||
int __len = ( ( 0 ) ); | |||||
if (__o->chunk_limit - __o->next_free < __len) _obstack_newchunk (__o, __len); __o->next_free += __len; (void) 0; }) ; __extension__ ({ struct obstack *__o1 = ( __h ); void *value; value = (void *) __o1->object_base; if (__o1->next_free == value) __o1->maybe_empty_object = 1; __o1->next_free = (( ((( __o1->next_free ) - (char *) 0) +__o1->alignment_mask) & ~ (__o1->alignment_mask) ) + (char *) 0) ; if (__o1->next_free - (char *)__o1->chunk > __o1->chunk_limit - (char *)__o1->chunk) __o1->next_free = __o1->chunk_limit; __o1->object_base = __o1->next_free; value; }) ; }) ; | |||||
static char cPickle_module_documentation[] = | |||||
"C implementation and optimization of the Python pickle module\n" | |||||
"\n" | |||||
"cPickle.c,v 1.48 1997/12/07 14:37:39 jim Exp\n" | |||||
; | |||||
@ -1,46 +0,0 @@ | |||||
typedef struct bitmap_element_def | |||||
{ | |||||
struct bitmap_element_def *next; | |||||
struct bitmap_element_def *prev; | |||||
unsigned int indx; | |||||
unsigned int bits[2 ]; | |||||
} bitmap_element; | |||||
typedef struct bitmap_head_def { | |||||
bitmap_element *first; | |||||
bitmap_element *current; | |||||
int indx; | |||||
} bitmap_head, *bitmap; | |||||
static __inline__ void | |||||
bitmap_element_free (head, elt) | |||||
bitmap head; | |||||
bitmap_element *elt; | |||||
{ | |||||
bitmap_element *next = elt->next; | |||||
} | |||||
main() { | |||||
/* See if this is a branch that is part of the path. If so, and it is | |||||
to be taken, do so. */ | |||||
if (next_branch->branch == insn) | |||||
{ | |||||
enum taken status = next_branch++->status; | |||||
if (status != NOT_TAKEN) | |||||
{ | |||||
if (status == TAKEN) | |||||
record_jump_equiv (insn, 1); | |||||
else | |||||
invalidate_skipped_block (NEXT_INSN (insn)); | |||||
/* Set the last insn as the jump insn; it doesn't affect cc0. | |||||
Then follow this branch. */ | |||||
prev_insn_cc0 = 0; | |||||
prev_insn = insn; | |||||
insn = JUMP_LABEL (insn); | |||||
continue; | |||||
} | |||||
} | |||||
} | |||||
@ -1,39 +0,0 @@ | |||||
typedef struct ppptype_ { | |||||
void *d; | |||||
void *l; | |||||
int t; | |||||
int m; | |||||
} ppptype; | |||||
typedef struct jjjtype_ jjjtype ; | |||||
typedef __typeof__ (sizeof (0)) size_t; | |||||
typedef unsigned char uchar; | |||||
typedef unsigned short ushort; | |||||
typedef unsigned long ulong; | |||||
typedef ulong cttype; | |||||
typedef char *zz_list; | |||||
typedef int boolean; | |||||
typedef unsigned char tl; | |||||
typedef void abctype; | |||||
typedef int wwd_t; | |||||
typedef enum { | |||||
F_FE, | |||||
F_U, | |||||
F_E, | |||||
} yy; | |||||
typedef void xyz; | |||||
typedef xyz (xyz_t)(void); | |||||
typedef abctype (abcproc)(void ); | |||||
typedef boolean (mnsss)(ppptype *); | |||||
typedef void (void_r)(void *, ...); | |||||
typedef boolean (boolean_e)(void *, ...); | |||||
typedef void (*tyyx_func)(void *, void *, void *); | |||||
typedef boolean (*bbhg_type)(jjjtype *); | |||||
typedef struct cl_ { | |||||
union { | |||||
uchar y[4]; | |||||
ushort s[2]; | |||||
ulong d; | |||||
} d; | |||||
} cl; | |||||