This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Remove ctime declaration in libgcc2.c


 > 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.

I don't think this will work unless ctime is already declared,
otherwise you'll just get a undeclared identifier error.

But if ctime was already declared, you wouldn't have the problem in
the first place.

		--Kaveh
--
Kaveh R. Ghazi			Engagement Manager / Project Services
ghazi@caip.rutgers.edu		Qwest Internet Solutions


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]