C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Using the phrase "ISO C++ conformant" (was: Name change to M

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ Language (Moderated)
View previous topic :: View next topic  
Author Message
Seungbeom Kim
Guest





PostPosted: Wed Jun 21, 2006 3:03 pm    Post subject: Using the phrase "ISO C++ conformant" (was: Name change to M Reply with quote



When I looked up the function "read" in MS Visual Studio 2005,
I got the following help:

Quote:
Run-Time Library Reference
read

This POSIX function is deprecated beginning in Visual C++ 2005.
Use the ISO C++ conformant _read instead.

I suspect Microsoft is not entitled to say that _read is "ISO C++
conformant"; in which way is _read more ISO C++ conformant than read?

--
Seungbeom Kim

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
Back to top
Rob Williscroft
Guest





PostPosted: Thu Jun 22, 2006 4:00 pm    Post subject: Re: Using the phrase "ISO C++ conformant" (was: Name change Reply with quote



Seungbeom Kim wrote in news:e79edr$g29$1 (AT) news (DOT) Stanford.EDU in
comp.lang.c++.moderated:

Quote:
When I looked up the function "read" in MS Visual Studio 2005,
I got the following help:

Run-Time Library Reference
read

This POSIX function is deprecated beginning in Visual C++ 2005.
Use the ISO C++ conformant _read instead.

I suspect Microsoft is not entitled to say that _read is "ISO C++
conformant"; in which way is _read more ISO C++ conformant than read?


The global "read" ( i.e. ::read ) is an identifier reserved for the user.

Globals that start with a single underscore (i.e. ::_read in this case)
are reserved by ISO C++ for the implementation (IIUC this also applies
to ISO C).

Thus Microsoft (being the implementor) may define as many leading
underscore globals as they like and claim conformity to the ISO C++
standard.

If they define the POSIX mandated global "read" they could claim at least
some conformance to the POSIX standard, but at the price of reduuced
conformance with ISO C++.

Rob.
--
http://www.victim-prime.dsl.pipex.com/

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
Back to top
Peter C. Chapin
Guest





PostPosted: Thu Jun 22, 2006 4:01 pm    Post subject: Re: Using the phrase "ISO C++ conformant" (was: Name change Reply with quote



Seungbeom Kim <musiphil (AT) bawi (DOT) org> wrote in news:e79edr$g29$1
@news.Stanford.EDU:

Quote:
read

This POSIX function is deprecated beginning in Visual C++ 2005.
Use the ISO C++ conformant _read instead.

I suspect Microsoft is not entitled to say that _read is "ISO C++
conformant"; in which way is _read more ISO C++ conformant than read?

I think what they are trying to say is that since a strictly conforming
program (is that correct use of terms?) might use the name 'read' for its
own purposes, it's dangerous to use such a function in the compiler
provided library. So for example if you call read() and then try to mix
your program with some other code that introduces a function named read(),
bad things might happen. On the other hand if you use _read() the other
code should never be defining that name and no conflicts can arise.

Peter

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
Back to top
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ Language (Moderated) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.