* [Bug 46731] New: difftime(3) may suggest that time_t can be a non-arithmetic type
@ 2012-08-30 19:25 bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
[not found] ` <bug-46731-11311-3bo0kxnWaOQUvHkbgXJLS5sdmw4N0Rt+2LY78lusg7I@public.gmane.org/>
0 siblings, 1 reply; 2+ messages in thread
From: bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r @ 2012-08-30 19:25 UTC (permalink / raw)
To: linux-man-u79uwXL29TY76Z2rM5mHXA
https://bugzilla.kernel.org/show_bug.cgi?id=46731
Summary: difftime(3) may suggest that time_t can be a
non-arithmetic type
Product: Documentation
Version: unspecified
Platform: All
OS/Version: Linux
Tree: Mainline
Status: NEW
Severity: normal
Priority: P1
Component: man-pages
AssignedTo: documentation_man-pages-ztI5WcYan/vQLgFONoPN62D2FQJk+8+b@public.gmane.org
ReportedBy: mgorny-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org
Regression: No
Created an attachment (id=78851)
--> (https://bugzilla.kernel.org/attachment.cgi?id=78851)
Patch changing the wording to the more exact problem
The difftime(3) manpage[1] states:
NOTES
On a POSIX system, time_t is an arithmetic type, and one could just
define
#define difftime(t1,t0) (double)(t1 - t0)
when the possible overflow in the subtraction is not a concern. On
other
systems, the data type time_t might use some other encoding where
subtraction doesn't work directly.
---
When I first read this, I got confused that time_t may actually be a
non-arithmetic type. But the C99 standard explicitly lists (in 7.23.1):
3 The types declared are size_t (described in 7.17); clock_t and time_t which
are arithmetic types capable of representing times
---
I think that particular paragraphs should be re-worked to explicitly state what
differences can arise in time_t implementations and what is the reason that
they can't be used to compute time differences. As far as I understand, the
only issue is that time_t can express time in units other than seconds.
I'm attaching a patch with my wording for that.
[1]:http://man7.org/linux/man-pages/man3/difftime.3.html
--
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug 46731] difftime(3) may suggest that time_t can be a non-arithmetic type
[not found] ` <bug-46731-11311-3bo0kxnWaOQUvHkbgXJLS5sdmw4N0Rt+2LY78lusg7I@public.gmane.org/>
@ 2012-12-21 16:30 ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
0 siblings, 0 replies; 2+ messages in thread
From: bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r @ 2012-12-21 16:30 UTC (permalink / raw)
To: linux-man-u79uwXL29TY76Z2rM5mHXA
https://bugzilla.kernel.org/show_bug.cgi?id=46731
Michael Kerrisk <mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
AssignedTo|documentation_man-pages@ker |mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
|nel-bugs.osdl.org |
--
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-12-21 16:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-30 19:25 [Bug 46731] New: difftime(3) may suggest that time_t can be a non-arithmetic type bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
[not found] ` <bug-46731-11311-3bo0kxnWaOQUvHkbgXJLS5sdmw4N0Rt+2LY78lusg7I@public.gmane.org/>
2012-12-21 16:30 ` [Bug 46731] " bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).