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]

Re: why are these alias sets different?


Mark Mitchell wrote:
> 
> Zack --
> 
>   `char' and `unsigned char' will wind up in the same alias set.  The
> -1 on `unsigned char' just means that it doesn't have an alias set
> yet.

*nod*

>   And `char *' and `unsigned char *' are not compatible types, which
> is why they don't have the same alias set.  You can't say:
> 
>   unsigned char c;
>   char *p;
>   unsigned char **pp = (unsigned char **) &p;
>   *pp = &c;

Thanks. I guess I should strip off exactly one layer of POINTER_TYPE
nodes and then do the comparison, special casing void * and char *.

Am I right to think that alias sets have nothing to do with the
base-pointer alias code?

zw


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