This is the mail archive of the
mailing list for the GCC project.
Re: Remove ctime declaration in libgcc2.c
- From: Graham Stott <grahams at redhat dot com>
- To: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>
- Cc: schwab at suse dot de, gcc-patches at gcc dot gnu dot org
- Date: Tue, 11 Dec 2001 16:18:17 +0000
- Subject: Re: Remove ctime declaration in libgcc2.c
- References: <10112111554.AA25329@vlsi1.ultra.nyu.edu>
Richard Kenner wrote:
> This will break ia64. You cannot have a function returning a pointer
> without a declaration. We either must include <time.h> or declare ctime
> manually. No other way will work, you'll get an instant crash.
> I'm open to suggestions. Nobody had any way to do either of those the
> last time it was discussed.
If I understand the problem we can't provide a prototype for ctime because
it may conflict with the standard prototype for ctime and without a prototype
ia64 is broken.
The only way I can see to get this to work is to cast all the uses of ctime
((void * (*)(void *))ctime) (&time_value);
which could all be wrapped up in a macro to hide it's ugliness.