aboutsummaryrefslogtreecommitdiffhomepage
path: root/test.c
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2023-05-26 09:20:58 +0200
committerlemon <lsof@mailbox.org>2023-05-26 09:20:58 +0200
commit640a3dac2b18d037169af15dfd5502c386c7e828 (patch)
tree79e7ee3fa81e73855ce1bc78d7c4bf1ad3ac8f0d /test.c
parent9100ed2b5dd01df8e6b766c7bc2a12c0dd44f1ff (diff)
hm
Diffstat (limited to 'test.c')
-rw-r--r--test.c40
1 files changed, 23 insertions, 17 deletions
diff --git a/test.c b/test.c
index 9eac7de..ee2b4d2 100644
--- a/test.c
+++ b/test.c
@@ -1,13 +1,20 @@
/* coment */
-int glob;
+#if 1+1 < (-2*2)
+wawa
+#elif 9<<1
+#define wow 3
+#else
+boop
+#endif
+int glob [ wow+wow];
int add (int x, int y) {
- return x + y + glob;
+ return x + y + *glob;
}
int abs(int x){
- return (x ^ x >> 31) + ((unsigned)x >> 31);
+ return (x ^ x >> 31) - (x >> 31);
}
int popcnt(unsigned x) {
@@ -16,24 +23,23 @@ int popcnt(unsigned x) {
return n;
}
-int foo(int x) {
- int work[10];
- work[x]=x;
- if (x == 0)
- return 1;
- else if (x == 1)
- return -1;
- else if (x < 0)
- return x;
- else
- return 0;
+struct f {
+ char x[(1<<12)-1];
+};
+
+int diff(struct f *x, struct f *y)
+{
+ x += 3;
+ --x;
+ return x - y;
}
-extern void printf(char *, ...);
+
+extern int printf(char *, ...);
int main() {
- char x;
+ unsigned char x = 255;
int k = x += 1;
- return abs(-33);
+ return abs(k);
}
//