remote TABs in doc/ and test/

This commit is contained in:
Christian Groessler
2019-02-12 22:50:49 +01:00
parent b9ea77b185
commit 7445550831
97 changed files with 5956 additions and 5963 deletions

View File

@@ -5,25 +5,25 @@
*/
main() {
return 0;
return 0;
}
nested(a,b) {
if ((a<4 && b == 'r')
|| (a == 1 && (b == 'h' || b == 'i'))
|| (a == 2 && (b == 'o' || b == 'y'))
) a=b;
if ((a<4 && b == 'r')
|| (a == 1 && (b == 'h' || b == 'i'))
|| (a == 2 && (b == 'o' || b == 'y'))
) a=b;
}
/* type name scope */
void s(struct D *d) {} /* this struct D differs from the one below */
void s(struct D *d) {} /* this struct D differs from the one below */
typedef struct D D;
struct D {int x, y;} Dy={0};
D Dz={1};
Dfunc(){
D a; a.y=1;
s(&Dy); /* error */
D a; a.y=1;
s(&Dy); /* error */
}
/* qualifiers */
@@ -33,39 +33,39 @@ const int a, *x; int b, *y;
volatile unsigned z;
f() {
x = y;
z = z + z; /* should be 2 references to z's r-value */
x = y;
z = z + z; /* should be 2 references to z's r-value */
}
f1() {
x = &a;
x = &b;
y = &a; /* error */
y = &b;
x = &a;
x = &b;
y = &a; /* error */
y = &b;
}
f2(int **a, int **b) {
f(&x, &y);
**a = 0;
return **b;
f(&x, &y);
**a = 0;
return **b;
}
g(const int *p) {
g(&a);
g(&b);
return *p;
g(&a);
g(&b);
return *p;
}
h(int *p) {
f(&a);
f(&b);
return *p;
f(&a);
f(&b);
return *p;
}
h1(const int x, int y) {
h1(a,b);
h1(b,a);
return x + y;
h1(a,b);
h1(b,a);
return x + y;
}
h2() {
char *b; const void *p;
p = b;
b = p; /* error (incompatible pointer type) */
char *b; const void *p;
p = b;
b = p; /* error (incompatible pointer type) */
}
/* static naming */
@@ -120,14 +120,14 @@ extern int strcmp(const char*, const char*);
extern void qsort(void*, int, int, int (*)(const void*, const void*));
extern int cmp(char**a, char**b) { return strcmp(*a,*b); }
sort() {
int n; char *a[100];
qsort(a, n, sizeof(char*), (int (*)(const void*, const void*))cmp);
int n; char *a[100];
qsort(a, n, sizeof(char*), (int (*)(const void*, const void*))cmp);
qsort(a, n, sizeof(char*), cmp); /* error (incompatible pointer type) */
}
/* nasty calls */
onearg(){
int a,b,c,d;
f( ( (a? (b = 1): (c = 2)), (d ? 3 : 4) ) ); /* 1 argument */
int a,b,c,d;
f( ( (a? (b = 1): (c = 2)), (d ? 3 : 4) ) ); /* 1 argument */
}