[LLVMdev] Porting to System z

Dan Gohman gohman at apple.com
Wed Apr 8 09:22:45 PDT 2009


On Apr 8, 2009, at 12:50 AM, Duncan Sands wrote:

> Hi Neale,
>
>> Yes, that works much better. However, I fear the problem is more to  
>> do with
>> trying to force enums to be a different size which appears not to be
>> supported by most compilers. The IBM C++ compiler apparently has a  
>> #pragma
>> which can be used to do it and gcc 4.3 seems to be happy with the  
>> hack
>> described but as Duncan says trying to force this behavior in a  
>> union is
>> probably less than desirable in the long term.
>
> I don't know if the union is invoking undefined behaviour or not,  
> but given
> the number of compilers it breaks it clearly needs to be changed.   
> I'm not sure
> the enum needs to be an enum, how about turning it into a uintptr_t  
> instead?


That's fine with me. It's all encapsulated within the MVT class so
it should be pretty easy to change.

Dan




More information about the llvm-dev mailing list