[llvm-commits] LLVM warnings (with gcc3.4)

Dale Johannesen dalej at apple.com
Fri Feb 26 11:29:22 PST 2010


On Feb 26, 2010, at 4:59 AMPST, Gabor Greif wrote:
> 
> These are IIRC in generated code:

Well, human-generated.

> llvm/lib/Target/X86/X86InstrInfo.cpp: In constructor `llvm::X86InstrInfo::X86InstrInfo(llvm::X86TargetMachine&)':
> llvm/lib/Target/X86/X86InstrInfo.cpp:219: warning: cast to pointer from integer of different size

These are things like 

    unsigned RegOp = OpTbl2Addr[i][0];
    unsigned MemOp = OpTbl2Addr[i][1];
    if (!RegOp2MemOpTable2Addr.insert(std::make_pair((unsigned*)RegOp,
                                                     MemOp)).second)

There are several tables that all take unsigned* .   This is safe on any target I'm familiar with since the conversion will not shorten, but it's peculiar.  Seems to go back to Evan's original implementation in 42509, why it is like this?





More information about the llvm-commits mailing list