473,585 Members | 2,552 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error in the standard?

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
3 1873
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.pow ernet.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
In <iU************ ******@newsread 1.news.pas.eart hlink.net> Kevin Goodsell <us************ *********@never box.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
On 26 Nov 2003 11:39:33 GMT, Da*****@cern.ch (Dan Pop) wrote:
In <iU************ ******@newsread 1.news.pas.eart hlink.net> Kevin Goodsell <us************ *********@never box.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.ne t
Nov 13 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
5021
by: Wayno | last post by:
My php logs are coming up empty. I have done all I can think of, and all that made sense to me. Can someone take a look at my php.ini please and tell me what you think may be the problem. I double-checked the path to my error log. It is in /var/www/logs/php_error_log Thanks. :) -Wayne Stevenson
67
4221
by: Steven T. Hatton | last post by:
Some people have suggested the desire for code completion and refined edit-time error detection are an indication of incompetence on the part of the programmer who wants such features. Unfortunately these ad hominem rhetorts are frequently introduced into purely technical discussions on the feasibility of supporting such functionality in C++....
9
3122
by: Rennie deGraaf | last post by:
If a C++ I/O operation fails, then how can I determine the cause? For instance, in C, I'd do something like this: FILE* file; file = fopen("foo.txt", "r"); if (file == NULL) { switch(errno) ... }
1
3911
by: JohnC | last post by:
I have this exact same scenario. It is new and seems to be related to when we installed Adobe 7.0 Standard/Professional. We have an MDB on a LAN file server. Using Access 2K and Windows 2K. When the application is opened by someone, it seems that if one of the Adobe 7.0 (Standard or Professional) users susequently open the application,...
3
2643
by: Alberto Giménez | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi there! I'm doing some homework (almost finished), but now i'm reconsidering a design decission I made at the beginning. This is about error handling in functions. I have my functions returning 0 if OK, and an "enum" error indicating the type of error. A typical pseudo-code is like:
8
3873
by: Michael Paesold | last post by:
I just read this in the MySQL manual: (http://dev.mysql.com/doc/mysql/en/InnoDB_Error_handling.html) "Error handling in InnoDB is not always the same as specified in the SQL standard. According to the standard, any error during an SQL statement should cause the rollback of that statement. InnoDB sometimes rolls back only part of the...
9
13256
by: Prasad | last post by:
HI, I am a beginner in VC++.. I am trying to write a Win32 console application in visual studio.. I am using following header files.. #include <STRING> using namespace std; #include <hash_map>//from Standard template library //and some other headers
4
1758
by: Miroslaw Makowiecki | last post by:
I have yourself c++ compiler about version of 4.3 it installed in a catalog:/usr/lib/gcc-snapshot in system Debian. libc6 version 2.6-5 For compilation of file about conntent,this below it appear following error: katusis@localhost:~$ /usr/lib/gcc-snapshot/bin/c++ -Wall tytan.cpp In file included from tytan.cpp:10:...
13
3796
by: Albert | last post by:
Hi I'm using the lcc compiler for win32. I tried compiling a program but there's an error stating: "cpp: Can't open input file clrscr()" I don't get it - I've included <tcconio.h>. (strange why they couldn't have just left it as <conio.h>?): #include <tcconio.h> // code
20
3236
by: jacob navia | last post by:
Consider this code static typedef struct { int boo; } FOO; This provokes with MSVC: ------------------------------ Microsoft (R) C/C++ Optimizing Compiler Version 14.00.50727.762 for x64 Copyright (C) Microsoft Corporation. All rights reserved.
0
7908
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7836
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8336
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7950
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8212
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
3863
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2343
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1447
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1175
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.