time_t definition

Thomas D. Dean tomdean at speakeasy.org
Wed Jan 16 21:32:12 UTC 2013


On 01/16/13 10:41, Robert Bonomi wrote:

> *precisely*  and the format string had "%ld".
> this IS a type mismatch, if a 'long' is a 64-bit value.

The original code was compiled on a 32-bit machine for a 32-bit target. 
  I tried %d, %ld, and %lld with the same result.

>
> FALSE.  Calculation is OK.  I/O format conversion is problematic.

In the simple example I posted, gcc did not complain of a format mismatch.

But, in the case of time_t gcc does complain of a format mismatch.

Both cases had the same number of typedef levels to get to a basic type
and used the same compile command.  Should have the same result...

I am attempting to understand the difference.

Tom Dean


More information about the freebsd-questions mailing list