John Ralls <[email protected]> writes:

> if (sizeof(time_t) == 8)
>   return (double)((int64)time1 - (int64)time2);
> else
>   return (double)((int32)time1 - (int32)time2);

This code probably wouldn't compile cleanly.  It would complain about
casting to different sizes.  Even though theoretically the compiler
should be able to optimize the branch by noticing that it is always true
or always false, it will still complain about the unused branch.  (I
know this from personal experience).

> That could be done as a macro and inserted into one of the header
> files in each library.
>
> Regards,
> John Ralls

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       [email protected]                        PGP key available
_______________________________________________
gnucash-devel mailing list
[email protected]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel

Reply via email to