DJ Delorie wrote: >> However, the C++ definition has been amended at the last Lillehammer >> meeting to allow that cast as "conditionally supported": either it is >> valid or it errors out. the compiler has to tell. > > Also, the mechanism to create multiple pointer sizes > (attribute((mode))) is a GCC extension.
I'm very suspicious of allowing users to specify this via attributes. Having pointers-to-objects or pointers-to-functions with different sizes (within one of those classes) seems problematic, but perhaps you can say more about how you expect this to work in the presence of conversions and such. I expected that what you were asking was whether the back end could reasonably say that function pointers had size four, say, while data pointers had size two. I think that's reasonable, but I don't find it nearly so reasonable to say that some "int *" pointers have size four while others have size two. But, maybe I just need appropriate motivation. Also, there is a nasty class of bugs in G++ stemming from the GCC attribute extensions because there are no well-defined rules about how to tell if two types with different attributes are the same or different, and if they are different what conversions (if any) can be used to convert back and forth. -- Mark Mitchell CodeSourcery [EMAIL PROTECTED] (650) 331-3385 x713