Error in the standard?

K

Kevin Goodsell

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
 
R

Richard Heathfield

Kevin said:
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.
 
D

Dan Pop

In said:
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
 
D

Dave Thompson

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top