[LLVMdev] sparse typedef int v8qi __attribute__ ((mode(V8QI))) warning
Eric Christopher
echristo at apple.com
Thu Jun 30 16:46:05 PDT 2011
On Jun 30, 2011, at 4:41 PM, Jack Howarth wrote:
> 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?
Seems like a reasonable enhancement request.
-eric
ps btw, you want cfe-dev next time.
More information about the llvm-dev
mailing list