By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,918 Members | 2,258 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,918 IT Pros & Developers. It's quick & easy.

Error in the standard?

P: n/a
I've found something that looks like an error in n869. Can anyone with
the actual standard tell me if it's different there? I'd also be
interested if anyone knows of a defect report addressing this.

The apparent error is in section 7.23.1, paragraphs 1 and 2. Paragraph 1
says:

The header <time.h> defines *four* macros, and declares
several types and functions for manipulating time.

(Emphasis added.) Paragraph 2 then goes on to describe *two* macros -
NULL and CLOCKS_PER_SEC. I don't see any additional macros described later.

One last question - is the number wrong, or did two macros that *are*
supposed to appear in time.h accidentally get left out?

-Kevin
--
My email address is valid, but changes periodically.
To contact me please use the address from a recent posting.

Nov 13 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Kevin Goodsell wrote:
I've found something that looks like an error in n869. Can anyone with
the actual standard tell me if it's different there? I'd also be
interested if anyone knows of a defect report addressing this.

The apparent error is in section 7.23.1, paragraphs 1 and 2. Paragraph 1
says:

The header <time.h> defines *four* macros, and declares
several types and functions for manipulating time.


The actual C99 Standard reads:

"The header <time.h> defines two macros, and declares several types and
functions for manipulating time."

I guess they fixed it.
--
Richard Heathfield : bi****@eton.powernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton
Nov 13 '05 #2

P: n/a
In <iU******************@newsread1.news.pas.earthlink .net> Kevin Goodsell <us*********************@neverbox.com> writes:
I've found something that looks like an error in n869. Can anyone with
the actual standard tell me if it's different there? I'd also be
interested if anyone knows of a defect report addressing this.

The apparent error is in section 7.23.1, paragraphs 1 and 2. Paragraph 1
says:

The header <time.h> defines *four* macros, and declares
several types and functions for manipulating time.

(Emphasis added.) Paragraph 2 then goes on to describe *two* macros -
NULL and CLOCKS_PER_SEC. I don't see any additional macros described later.

One last question - is the number wrong, or did two macros that *are*
supposed to appear in time.h accidentally get left out?


Both C89 and C99 talk about two macros. At one point, during the C99
drafting process, they might have added two more macros. Later, they
changed their mind and removed them, but forgot to update the macro
count until after releasing the final public draft.

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 13 '05 #3

P: n/a
On 26 Nov 2003 11:39:33 GMT, Da*****@cern.ch (Dan Pop) wrote:
In <iU******************@newsread1.news.pas.earthlink .net> Kevin Goodsell <us*********************@neverbox.com> writes:
I've found something that looks like an error in n869. <snip>
The apparent error is in section 7.23.1, paragraphs 1 <snip>
The header <time.h> defines *four* macros, <snip>
(Emphasis added.) Paragraph 2 then goes on to describe *two* macros -
NULL and CLOCKS_PER_SEC. I don't see any additional macros described later.

One last question - is the number wrong, or did two macros that *are*
supposed to appear in time.h accidentally get left out?


Both C89 and C99 talk about two macros. At one point, during the C99
drafting process, they might have added two more macros. Later, they
changed their mind and removed them, but forgot to update the macro
count until after releasing the final public draft.

There was a not-too-long-lived proposal to add a significant amount of
new "xtime" stuff, including the two macros -- n843 definitely has it,
and I don't have any earlier drafts at hand to check -- but it did not
obtain consensus, and rather than risk delaying the standard
(further?) the committee just dropped it and went back to the C90
version, except for added formats in strftime, mostly(?) from POSIX.
Someone -- I vaguely recall maybe Markus Kuhn -- suggested a separate
group (list?) to continue work on time stuff post-99, but I haven't
heard any more recently (nor checked).
- David.Thompson1 at worldnet.att.net
Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.