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

@@ -20,11 +20,11 @@ main()
#ifdef REFCC
#include <stdint.h>
struct foo {
int16_t a;
char b;
int16_t x : 12, y : 4;
int16_t zz : 1, : 0, : 4, z : 3;
char c;
int16_t a;
char b;
int16_t x : 12, y : 4;
int16_t zz : 1, : 0, : 4, z : 3;
char c;
} x = { 1, 2, 3, 4, 5, 6 };
struct baz { uint16_t a:2, b:4, c:16;} y = { 7, 8, 9};
@@ -33,11 +33,11 @@ int16_t i = 8;
#else
struct foo {
int a;
char b;
int x : 12, y : 4;
int zz : 1, : 0, : 4, z : 3;
char c;
int a;
char b;
int x : 12, y : 4;
int zz : 1, : 0, : 4, z : 3;
char c;
} x = { 1, 2, 3, 4, 5, 6 };
struct baz { unsigned int a:2, b:4, c:16;} y = { 7, 8, 9};
@@ -46,10 +46,10 @@ int i = 8;
#else
struct foo {
int a;
char b;
int x : 12, y : 4, : 0, : 4, z : 3;
char c;
int a;
char b;
int x : 12, y : 4, : 0, : 4, z : 3;
char c;
} x = { 1, 2, 3, 4, 5, 6 };
struct baz { unsigned int a:2, b:4, c:32;} y = { 7, 8, 9};
@@ -63,32 +63,32 @@ f2(struct baz *p);
main()
{
printf("x = %d b:%d %d %d %d c:%d\n", x.a, x.b, x.x, x.y, x.z, x.c);
printf("y = %d b:%d c:%d\n", y.a, y.b, y.c);
x.y = i;
x.z = 070;
printf("x = %d b:%d %d %d %d c:%d\n", x.a, x.b, x.x, x.y, x.z, x.c);
y.a = 2;
y.c = i;
printf("y = %d b:%d c:%d\n", y.a, y.b, y.c);
printf("x = %d b:%d %d %d %d c:%d\n", x.a, x.b, x.x, x.y, x.z, x.c);
printf("y = %d b:%d c:%d\n", y.a, y.b, y.c);
x.y = i;
x.z = 070;
printf("x = %d b:%d %d %d %d c:%d\n", x.a, x.b, x.x, x.y, x.z, x.c);
y.a = 2;
y.c = i;
printf("y = %d b:%d c:%d\n", y.a, y.b, y.c);
#ifdef CAST_STRUCT_PTR
f2((struct baz *)&x);
f2((struct baz *)&x);
#else
f2(&x);
f2(&x);
#endif
return 0;
return 0;
}
f1(struct baz *p) {
p->a = p->b = 0;
if (p->b)
printf("p->b != 0!\n");
p->a = 0x3; p->b = 0xf;
printf("p->a = 0x%x, p->b = 0x%x\n", p->a, p->b);
p->a = p->b = 0;
if (p->b)
printf("p->b != 0!\n");
p->a = 0x3; p->b = 0xf;
printf("p->a = 0x%x, p->b = 0x%x\n", p->a, p->b);
}
f2(struct baz *p) {
p->a = (i==0);
p->b = (f1(p),0);
p->a = (i==0);
p->b = (f1(p),0);
}
#endif

View File

@@ -7,9 +7,9 @@
#include <stdio.h>
#include <limits.h>
#define SSHRT_MAX SHRT_MAX
#define SINT_MAX INT_MAX
#define SLONG_MAX LONG_MAX
#define SSHRT_MAX SHRT_MAX
#define SINT_MAX INT_MAX
#define SLONG_MAX LONG_MAX
#define UCHAR_MIN 0
#define USHRT_MIN 0

File diff suppressed because it is too large Load Diff