tsp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tsp-devel] Bunch of warning on 64 bit linux


From: Robert de Vries
Subject: Re: [Tsp-devel] Bunch of warning on 64 bit linux
Date: Sun, 10 Feb 2008 14:29:09 +0100
User-agent: KMail/1.9.6 (enterprise 0.20071204.744707)

On Sunday 10 February 2008 12:45:45 am Eric Noulard wrote:
> Hi all,
>
> Is anyone here actively using TSP on 64 bits Linux ?
No, not yet. But I have tried to compile it recently and got a bunch of 
warnings.
As soon as EuroSim will be available on 64 bits, I would appreciate it if the 
warnings/errors have been fixed.


>
> I do have a bunch of warnings regarding bad size cast
> between integer and pointer and bad format for pointer etc...
>
> I will try a patch soon since casting from 64 bit pointer to from a 32 bits
> int is really a bad idea.

To put it mildly yes.

>
> Most of the time it is done inside printf but...

This is somewhat of an ugly problem. There are some solutions for Linux/GCC 
using non-standard formats (like z for size_t arguments).
Otherwise you have to do some ugly casting to cast a variable to a builtin 
type or you must provide different format strings for different compilation 
modes (or even different compilers) (which is also ugly).
Typical lose-lose scenario.

        Robert






reply via email to

[Prev in Thread] Current Thread [Next in Thread]