aboutsummaryrefslogtreecommitdiffhomepage
path: root/test.c
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2023-05-10 20:38:32 +0200
committerlemon <lsof@mailbox.org>2023-05-10 20:38:32 +0200
commit9100ed2b5dd01df8e6b766c7bc2a12c0dd44f1ff (patch)
tree0598b126bdddb7db462a2f0915e272d4345c0c39 /test.c
initial commit
Diffstat (limited to 'test.c')
-rw-r--r--test.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/test.c b/test.c
new file mode 100644
index 0000000..9eac7de
--- /dev/null
+++ b/test.c
@@ -0,0 +1,39 @@
+/* coment */
+
+int glob;
+
+int add (int x, int y) {
+ return x + y + glob;
+}
+
+int abs(int x){
+ return (x ^ x >> 31) + ((unsigned)x >> 31);
+}
+
+int popcnt(unsigned x) {
+ int n = 0;
+ while (x) x >>= 1, n++;
+ 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;
+}
+
+extern void printf(char *, ...);
+int main() {
+ char x;
+ int k = x += 1;
+ return abs(-33);
+}
+
+//