[patch] may_alias attribute

Zack Weinberg zack@codesourcery.com
Sun Jan 27 15:27:00 GMT 2002


On Fri, Jan 25, 2002 at 10:42:37PM +0000, Joseph S. Myers wrote:
> 
> Call them __builtin_int8_t and __builtin_uint8_t (with appropriate values
> substituting for 8 on systems with non-8-bit char).  I think these are a
> good idea (and ought to be used in <stdint.h>).  

That's a lot more involved of a patch, though.

Arguably int __attribute__ ((mode(QI))) ought not to alias other types.

> One thing that came up when these were discussed previously: how do
> you handle / mangle those types in C++ (which, unlike C99, doesn't
> have the notion of extended integer types, into which such types fit
> well)?

For an immediate implementation, we could leave the builtins out of
the C++ front end; this would only affect <stdint.h> beyond quality
of optimization.

There are a lot of things in C99 that we might want to investigate
folding into C++ as extensions-to-be-proposed-for-standardization.
This is one of them.

zw



More information about the Gcc-patches mailing list