From: Richard Henderson <richard@atheist.tamu.edu>
Subject: Re: _printf_ problem
Date: Tue, 6 Aug 1996 18:37:03 -0500 (CDT) [thread overview]
Message-ID: <m0unvgN-0001uvC@atheist.tamu.edu> (raw)
In-Reply-To: <32075000@msmailgtwy.nvl.symix.com>
> I finally tracked the problem down to this
>
> time (&t);
> printf ("%s\n ", ctime (&t) + 4);
>
> Does anybody have a clue as to why this is happening.
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
next parent reply other threads:[~1996-08-06 23:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <32075000@msmailgtwy.nvl.symix.com>
1996-08-06 23:37 ` Richard Henderson [this message]
1996-08-07 12:16 _printf_ problem David Wild
-- 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