This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/47802] [4.6 Regression] libgfortran/intrinsics/ctime.c:75:3: error: too few arguments to function 'ctime_r'
- From: "dave at hiauly1 dot hia.nrc.ca" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 5 Mar 2011 17:06:29 +0000
- Subject: [Bug libfortran/47802] [4.6 Regression] libgfortran/intrinsics/ctime.c:75:3: error: too few arguments to function 'ctime_r'
- Auto-submitted: auto-generated
- References: <bug-47802-4@http.gcc.gnu.org/bugzilla/>
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