This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: AltiVec too pedantic about type qualifiers



On Monday, February 25, 2002, at 10:40  AM, Daniel Egger wrote:

> Hija,
>
> I just discovered that AltiVec is quite pedantic and anal about type
> qualifiers.
>
> #include <altivec.h>
>
> void test (const char *test)
> {
>   vector signed char vec;
>
>   vec = vec_ld (0, test);
> }
>

const problem again.

but if you fix the const, you'll get an incompatible assignment.
this is because you're probably building on darwin which has
char defaulting to unsigned char, so vec_ld will return a
"vector unsigned char".

this is an inconsistency in darwin having chars being unsigned.

so you'll have to do:

void test (signed char *test)
            ^^^^^^
{
   vector signed char vec;
   vec = vec_ld (0, test);
}

i think there's probably a flag to have gcc's chars default to
signed (anyone??)

> none.c:283: incompatible types in assignment
> none.c:296: Internal compiler error in gen_reg_rtx, at emit-rtl.c:654
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
>
> but unfortunately I cannot release this code and I haven't been able to
> synthesize a testcase which bails out with an compiler error yet.

ok, *this* is a valid error.  you're going to have to simplify it
enough for me to reproduce.  if you want, send it off list and
i'll fix it.

>
> --
> Servus,
>        Daniel
>
>
--
Aldy Hernandez                                E-mail: aldyh@redhat.com
Professional Gypsy Lost in Australia
Red Hat, Inc.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]