| View previous topic :: View next topic |
| Author |
Message |
Seungbeom Kim Guest
|
Posted: Wed Jun 21, 2006 3:03 pm Post subject: Using the phrase "ISO C++ conformant" (was: Name change to M |
|
|
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
|
Posted: Thu Jun 22, 2006 4:00 pm Post subject: Re: Using the phrase "ISO C++ conformant" (was: Name change |
|
|
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
|
Posted: Thu Jun 22, 2006 4:01 pm Post subject: Re: Using the phrase "ISO C++ conformant" (was: Name change |
|
|
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 |
|
 |
|