compilation error

Tim Prince timothyprince@sbcglobal.net
Sat Oct 7 19:36:00 GMT 2006


ranjith kumar wrote:
> Hi,
> -------------------------------------------------------
> #include <mmintrin.h>
> int  main()
> {
>    __m64 m1 = 0x00ff00a300bc00ae;
>    __m64 m2 = 0x0001000100010001;
>  __m64 m3;
>    unsigned char *data;
>    unsigned char ch;
>    int i;
> //asm ("pmaddwd m1,m2\n\t");
>    m3 =_mm_madd_pi16 (m1, m2);
>    printf("value is %x%x\n", m1);
>    printf("value is %x%x\n", m2);
>    printf("value is %x%x\n", m3);
> data = (char *)&m3;
>    for ( i = 0; i < 8; i++)
>         {
>         printf("Element %d value is %x\n", i,
> data[i]);
>         }
>    return;
> }
> ------------------------------------------------------
> I got the following error when I compiled the above
> program with gcc 4.0.0 compiler on pentium4 processor.
> The compilation command :
>  gcc -march=pentium4 sample.c
> ----------------------------------------------
> sample.c: In function `main':
> sample.c:7: invalid initializer
> sample.c:8: invalid initializer
> ----------------------------------------------

Does it make a difference if you add LL suffix?  Without that, your 
constant is implicitly typed int.  Not that I can buy in to whatever 
you're trying to do.



More information about the Gcc-help mailing list