strict aliasing warning in x86 land

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

strict aliasing warning in x86 land

Mike Stump
/Volumes/mrs5/net/llvm/llvm/llvm/lib/Target/X86/X86ISelLowering.cpp:  
In member function 'llvm::SDOperand  
llvm::X86TargetLowering::LowerTRAMPOLINE(llvm::SDOperand,  
llvm::SelectionDAG&)':
/Volumes/mrs5/net/llvm/llvm/llvm/lib/Target/X86/X86ISelLowering.cpp:
5305: warning: dereferencing type-punned pointer will break strict-
aliasing rules

:-(
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: strict aliasing warning in x86 land

Duncan Sands
On Saturday 15 December 2007 08:36:02 Mike Stump wrote:
> /Volumes/mrs5/net/llvm/llvm/llvm/lib/Target/X86/X86ISelLowering.cpp:  
> In member function 'llvm::SDOperand  
> llvm::X86TargetLowering::LowerTRAMPOLINE(llvm::SDOperand,  
> llvm::SelectionDAG&)':
> /Volumes/mrs5/net/llvm/llvm/llvm/lib/Target/X86/X86ISelLowering.cpp:
> 5305: warning: dereferencing type-punned pointer will break strict-
> aliasing rules
>
> :-(

Can you please paste the line (line number 5305 isn't in LowerTRAMPOLINE
in my tree...).

Thanks,

Duncan.
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: strict aliasing warning in x86 land

Mike Stump
On Dec 15, 2007, at 2:15 AM, Duncan Sands wrote:
> Can you please paste the line (line number 5305 isn't in  
> LowerTRAMPOLINE
> in my tree...).

You have to run svn update for it to have that line...  :-)

     unsigned char N86Reg  =  
((X86RegisterInfo&)RegInfo).getX86RegNum(NestReg);

I've not thought long or hard about the validity of the warning...  
I'm hoping that it is accurate.  Let me know if you think otherwise.
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: strict aliasing warning in x86 land

Chris Lattner

On Dec 15, 2007, at 12:26 PM, Mike Stump wrote:

> On Dec 15, 2007, at 2:15 AM, Duncan Sands wrote:
>> Can you please paste the line (line number 5305 isn't in
>> LowerTRAMPOLINE
>> in my tree...).
>
> You have to run svn update for it to have that line...  :-)
>
>     unsigned char N86Reg  =
> ((X86RegisterInfo&)RegInfo).getX86RegNum(NestReg);
>
> I've not thought long or hard about the validity of the warning...
> I'm hoping that it is accurate.  Let me know if you think otherwise.

Yep, clearly bogus.  Fixed:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20071210/056376.html

Thanks,

-Chris
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev