[splint-discuss] Porting 32 to 64 bits
Michael Wojcik
Michael.Wojcik at MicroFocus.com
Tue Apr 10 07:44:59 PDT 2007
> From: splint-discuss-bounces at cs.virginia.edu
> [mailto:splint-discuss-bounces at cs.virginia.edu] On Behalf Of
> Ibéria Medeiros
> Sent: Tuesday, 10 April, 2007 09:44
>
> On 4/10/07, Michael Wojcik <Michael.Wojcik at microfocus.com> wrote:
> > As far as I know, there's currently no splint check for
> > assignment of a pointer type to an integer type with a
> > (proper) cast. If you cast, splint generally assumes you
> > know what you're doing.
>
> The problem is when i porting 32 bits to 64 bits, the instructions
> int = long (32 = 64 bits, in LP64) lose bits, and splint with
> -ignorequals set warning me
Yes, I understand all of that. I'm well aware of the issues with converting integral types in various 64-bit models.
> int = ptr or int = (cast)ptr (32 = 64 bits, in LP64), splint dont
> warning! There is any flag in splint that detect this?
Not if you use the cast. That was the point of my previous message.
Without the cast, splint will warn about the assignment by default. You have to specify "-type" to get splint to not warn about it.
--
Michael Wojcik
Principal Software Systems Developer, Micro Focus
More information about the splint-discuss
mailing list