22 lines
637 B
C
22 lines
637 B
C
#include <stdio.h>
|
|
#include <libguile/scm.h>
|
|
|
|
#if (-1 >> 2 == -1) && (-4 >> 2 == -1) && (-5 >> 2 == -2) && (-8 >> 2 == -2)
|
|
# define SCM_SRS(x, y) ((x) >> (y))
|
|
#else
|
|
# define SCM_SRS(x, y) \
|
|
((x) < 0 \
|
|
? -1 - (scm_t_signed_bits) (~(scm_t_bits)(x) >> (y)) \
|
|
: ((x) >> (y)))
|
|
#endif
|
|
|
|
int main () {
|
|
unsigned long mask = 0xfffffffffffffffe;
|
|
unsigned long x = (4 << 2) + 2;
|
|
unsigned long y = (2 << 2) + 2;
|
|
unsigned long z = ((x + y) >> 2) + 2;
|
|
printf ("BLAH: %d\n", BLAH);
|
|
printf ("%ld\n", sizeof(long));
|
|
printf ("%lx\n", (long) z >> 2);
|
|
}
|