Clarification anyone? -- was Re: Linux and aliasing?

Martin v. Loewis martin@mira.isdn.cs.tu-berlin.de
Wed Jun 30 15:43:00 GMT 1999


> I thought it was unsigned char*? I don't think signed types are required
> to have a one-to-one correspondence between valid values and all
> possible bit patterns (so converting an arbitrary pointer to char* and
> dereferencing might trigger a trap representation).

In C99, section 6.5/7 says

>> An object shall have its stored value accessed only by an lvalue
>> expression that has one of the following types:
>> - a type compatible with the effective type of the object,
>> ...
>> - a character type.

In that context, "character type" means char, signed char, and
unsigned char.

Regards,
Martin



More information about the Gcc mailing list