August 09, 2001
I have encountered a bug when shifting a 'long' variable. See the sample program below.

/*
* Test to show bug with bit-shifting a long variable.
* To show bug, compile with
*       sc -msd -3 foo.c
* To remove bug, compile with
*       sc -msd foo.c
*/
#include <stdio.h>

int main(int argc, char *argv[])
{
    unsigned a;
    long b;

    a = 29;
    b = 1L << a;
    printf("b=%08lX",b);
    return(0);
}



August 10, 2001
You're right. I'll get it fixed. -Walter

tjulian wrote in message <9kv1ap$1823$1@digitaldaemon.com>...
>I have encountered a bug when shifting a 'long' variable. See the sample program below.
>
>/*
>* Test to show bug with bit-shifting a long variable.
>* To show bug, compile with
>*       sc -msd -3 foo.c
>* To remove bug, compile with
>*       sc -msd foo.c
>*/
>#include <stdio.h>
>
>int main(int argc, char *argv[])
>{
>    unsigned a;
>    long b;
>
>    a = 29;
>    b = 1L << a;
>    printf("b=%08lX",b);
>    return(0);
>}
>
>
>