This is the mail archive of the gcc-bugs@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]

[Bug libfortran/47802] [4.6 Regression] libgfortran/intrinsics/ctime.c:75:3: error: too few arguments to function 'ctime_r'


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47802

--- Comment #35 from dave at hiauly1 dot hia.nrc.ca 2011-03-05 17:06:23 UTC ---
> > In testing fix for above, I see:
> > 
> > ../../../gcc/libgfortran/intrinsics/ctime.c: In function 'strctime':
> > ../../../gcc/libgfortran/intrinsics/ctime.c:43:20: warning: initialization
> > makes pointer from integer without a cast [enabled by default]
> > 
> > Unfortunately, localtime_r has a different proto:
> > 
> > int localtime_r(const time_t *timer, struct tm *result);
> > 
> > Dave
> 
> Thanks to some __builtin tricks by Jakub, handling the different return types
> should now work. However, one more possible issue: In
> http://docs.hp.com/en/947/d8.html it says the old DCE threads prototype is 
> 
> int localtime_r ( struct tm *result, time_t *clock );

I believe the above document is wrong.  Both the HP-UX 10.20 manpage and
header show the definition that I quoted.  Same for the _PTHREADS_DRAFT4
definition in HP-UX 11.X

Dave


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