aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/test3.c
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2023-06-12 19:16:39 +0200
committerlemon <lsof@mailbox.org>2023-06-12 19:16:39 +0200
commit106fe60243bd61d017d28795f6eba68fecc981b4 (patch)
tree7fbb5c1a84346af8243630cb6c0057ab9b475978 /test/test3.c
parent6df4f80c99609162ad3e46bfdce46d0c10696a45 (diff)
dec,inc,sub
Diffstat (limited to 'test/test3.c')
-rw-r--r--test/test3.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/test/test3.c b/test/test3.c
index c39d15b..8bd9020 100644
--- a/test/test3.c
+++ b/test/test3.c
@@ -12,10 +12,22 @@ int shcl(int a, int b) {
return a << (b+1);
}
-int div(int a,int b) {
- return a < 0 ? a / b : b / a;
+struct p { long x,y; };
+struct p divsh(int a) {
+ struct p p;
+ p.x = a << (a / 5);
+ p.y = a;
+ return p;
}
+struct bitset { unsigned long long u; };
+static inline void
+bscopy(struct bitset dst[/*siz*/], const struct bitset src[/*siz*/], unsigned siz)
+{
+ while (siz--) dst++->u = src++->u;
+}
+
+
#if 0
long test(long x) {
return x + (long)"abc";