Re: isascii???
From: tom_usenet (tom_usenet_at_hotmail.com)
Date: 08/16/04
- Next message: tom_usenet: "Re: isascii???"
- Previous message: Jerry Coffin: "Re: newbie needs help with ostream_iterator"
- In reply to: Jerry Coffin: "Re: isascii???"
- Next in thread: Jerry Coffin: "Re: isascii???"
- Reply: Jerry Coffin: "Re: isascii???"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 16 Aug 2004 11:45:17 +0100
On Sat, 14 Aug 2004 09:30:40 -0600, Jerry Coffin <jcoffin@taeus.us>
wrote:
>In article <ejxtoWHgEHA.2916@TK2MSFTNGP12.phx.gbl>,
>m.holmes@nospam.it says...
>
>[ ... ]
>
>> is 'isascii' a reserved word?
>
>Section 7.26.2 of the C standard reserves all external names that
>start with 'is' followed by any lower-case letter. Section 7.1.4
>gives permission for functions defined in the headers to be
>additionally defined as macros.
The C++ standard doesn't seem to reserve "is*" words (looking in the
reserved names section). I also can't see anything allowing standard
functions to be macros, and indeed, some c library headers use inline
functions rather than macros if __cplusplus is defined.
>> I guess 'isascii' is a macro defined in cctype, but since the following
>> sample does not compile in VC71, and this is somehow unexpected, might it be
>> a bug?
>
>IMO, it's open to some question and interpretation, to the point that
>it's clearly a bad idea at best.
>
>The question and interpretation come in from the wording in the
>standard -- section 7.26 is titled "Future Library Directions", which
>seems to indicate that its limitations are meant to describe things
>that might be added to the library sometime in the future. OTOH, if
>you read 7.26.2 by itself, it simply says that names for external
>identifiers that start with 'is' followed by a lower-case letter may
>be added to the ctype.h (and, therefore, cctype) header. Section
>7.1.4 says that if the implementation does provide a global function
>by that name, it can also provide a macro by the same name.
>
>IOW, I think it's more by accident than design, but I'd say this is a
>conforming extension.
But we're talking about C++, not C, and I don't think it's a
conforming extension in C++, or is it?
Tom
- Next message: tom_usenet: "Re: isascii???"
- Previous message: Jerry Coffin: "Re: newbie needs help with ostream_iterator"
- In reply to: Jerry Coffin: "Re: isascii???"
- Next in thread: Jerry Coffin: "Re: isascii???"
- Reply: Jerry Coffin: "Re: isascii???"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|