Jack Howarth
2011-Jun-30 23:41 UTC
[LLVMdev] sparse typedef int v8qi __attribute__ ((mode(V8QI))) warning
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
Eric Christopher
2011-Jun-30 23:46 UTC
[LLVMdev] sparse typedef int v8qi __attribute__ ((mode(V8QI))) warning
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.