Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: David Wild <dawild@symix.com>
Subject: Re: _printf_  problem
Date: Wed, 07 Aug 96 08:16:00 EDT	[thread overview]
Message-ID: <2689ad531d8a7dbe386d3775add27c95.axp-list@archive.invalid> (raw)

I believe I owe you a beer.
That was the solution.  I didn't even realize time.h wasn't there.

Thanks again

>>     time (&t);
>>     printf ("%s\n ", ctime (&t) + 4);
>>
>I'd bet a beer you don't include time.h and so get a prototype for ctime().
>
>With no prototype, the compiler, by law, must assume ctime returns an int,
>and so the 64-bit pointer gets truncated to 32 bits.  gcc -Wall should
>warn you about using an integral type where a pointer is expected in the
>printf format.
>
>
>r~
>

--
To unsubscribe: mail -s unsubscribe axp-list-request@redhat.com < /dev/null

             reply	other threads:[~1996-08-07 12:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-08-07 12:16 David Wild [this message]
     [not found] <32075000@msmailgtwy.nvl.symix.com>
1996-08-06 23:37 ` _printf_ problem Richard Henderson
  -- strict thread matches above, loose matches on Subject: below --
1996-08-06 15:25 David Wild
1996-08-06 15:06 David Mosberger-Tang
1996-08-06 14:00 David Wild
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox