Re: [C++] ceil() outside <cmath>
From: B. v Ingen Schenau (bart_at_ingen.ddns.info)
Date: 04/04/04
- Next message: Richard Heathfield: "Re: couple of general questions"
- Previous message: Cerf: "Re: Struct problem - Are nested structs possible - Almost there"
- In reply to: Robert W Hand: "Re: [C++] ceil() outside <cmath>"
- Next in thread: Robert W Hand: "Re: [C++] ceil() outside <cmath>"
- Reply: Robert W Hand: "Re: [C++] ceil() outside <cmath>"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 04 Apr 2004 22:19:09 +0200
Robert W Hand wrote:
> On Sun, 04 Apr 2004 11:21:44 +0200, "B. v Ingen Schenau"
> <bart@ingen.ddns.info> wrote:
>
>>There is more explicit language to that extent in subclause 7.1.3, bullets
>>3 and 5.
>>The standard states there that macros and file-scope identifiers, that are
>>defined in the standard, are only reserved if an associated header is
>>included.
>>
>>That makes that this program is strictly conforming in C:
>>
>>#include <stdio.h>
>>int main()
>>{
>> int strlen = 42;
>>
>> printf("%d", strlen);
>> return 0;
>>}
>
> I don't think so. Check out 7.26.
>
> "The following names are grouped under individual headers for
> convenience. All external names described below are reserved no matter
> what headers are included by the program."
>
> "7.26.11 String handling <string.h>
>
> 1 Function names that begin with str, mem, or wcs and a lowercase
> letter may be added to the declarations in the <string.h> header."
>
> So strlen is not an allowable identifier.
If subclause 7.26p1, which uses quite broad wording, is overriding over
subclause 7.1.3, which is quite specific about the conditions under which
names are reserved, then why did they not just state that the names
specified in the standard are reserved under all conditions?
And in addition, if subclause 7.26 overrides 7.1.3, you can't use names like
'is_valid', 'member' or 'total' either, because they are also reserved
subclause 7.26.
Bart v Ingen Schenau
-- a.c.l.l.c-c++ FAQ: http://ma.rtij.nl/acllc-c++.FAQ.html c.l.c FAQ: http://www.eskimo.com/~scs/C-faq/top.html c.l.c++ FAQ: http://www.parashift.com/c++-faq-lite/
- Next message: Richard Heathfield: "Re: couple of general questions"
- Previous message: Cerf: "Re: Struct problem - Are nested structs possible - Almost there"
- In reply to: Robert W Hand: "Re: [C++] ceil() outside <cmath>"
- Next in thread: Robert W Hand: "Re: [C++] ceil() outside <cmath>"
- Reply: Robert W Hand: "Re: [C++] ceil() outside <cmath>"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|