[LLVMdev] sparse typedef int v8qi __attribute__ ((mode(V8QI))) warning

Jack Howarth howarth at bromo.med.uc.edu
Thu Jun 30 16:41:47 PDT 2011


   While solving a clang build issue with netpbm10 on fink darwin11, I noticed that
clang seems to provide poor error messages compared to llvm-gcc. For llvm-gcc, we get
the very helpful warning...

libpbm3.c: In function 'packBitsWithMmxSse':
libpbm3.c:120: warning: specifying vector types with __attribute__ ((mode)) is deprecated
libpbm3.c:120: warning: use __attribute__ ((vector_size)) instead

whereas clang only produces...

libpbm3.c:120:38: error: unknown machine mode 'V8QI'
    typedef int v8qi __attribute__ ((mode(V8QI)));
                                     ^
libpbm3.c:129:36: error: passing 'v8qi' (aka 'int') to parameter of incompatible type '__attribute__((__vector_size__(8 * sizeof(char)))) char'
            __builtin_ia32_pcmpeqb(*(v8qi*) (&bitrow[col]), *(v8qi*) &zero64);
                                   ^~~~~~~~~~~~~~~~~~~~~~~
libpbm3.c:131:37: error: passing 'const v8qi' (aka 'const int') to parameter of incompatible type '__attribute__((__vector_size__(8 * sizeof(char)))) char'
            __builtin_ia32_pmovmskb(compare);
                                    ^~~~~~~

which is much more cryptic. Any idea why this is the case?
            Jack



More information about the llvm-dev mailing list