This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: __opr reserved ?
- To: Harri Porten <porten at tu-harburg dot de>
- Subject: Re: __opr reserved ?
- From: Alexandre Oliva <oliva at dcc dot unicamp dot br>
- Date: 15 Jun 1999 17:01:13 -0300
- Cc: egcs-bugs at egcs dot cygnus dot com, egcs-patches at egcs dot cygnus dot com
- References: <37663F5B.9DB2A65B@tu-harburg.de> <orogihr4gq.fsf@saci.lsd.dcc.unicamp.br> <376655A4.64836C84@tu-harburg.de>
On Jun 15, 1999, Harri Porten <porten@tu-harburg.de> wrote:
> Alexandre Oliva wrote:
>>
>> On Jun 15, 1999, Harri Porten <porten@tu-harburg.de> wrote:
>>
>> > int __opr;
>>
>> > test.cc:6: declaration of `operator long double' as non-function
>>
>> The name __opr (as all names starting with two underscores) are
>> reserved for internal use in the compiler implementation. You should
>> not use any such names directly.
> Mmmmh. I didn't use it directly in the beginning. It's coming from
> <stl_algo.h> and there are quite a few '__' variables !
I see. Here's a patch. Jason, Mark, ok to install in trunk & branch?
--
Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
{oliva,Alexandre.Oliva}@dcc.unicamp.br aoliva@{acm.org,computer.org}
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
*** E-mail about software projects will be forwarded to mailing lists
Index: libstdc++/stl/ChangeLog
from Alexandre Oliva <oliva@dcc.unicamp.br>
* stl_algo.h (transform): Rename __opr to __oper, as __opr is used
internally by egcs.
Reported by Harri Porten <porten@tu-harburg.de>
Index: libstdc++/stl/stl_algo.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/libstdc++/stl/stl_algo.h,v
retrieving revision 1.4
diff -u -r1.4 stl_algo.h
--- libstdc++/stl/stl_algo.h 1998/09/02 17:24:41 1.4
+++ libstdc++/stl/stl_algo.h 1999/06/15 19:59:54
@@ -446,9 +446,9 @@
template <class _InputIter, class _OutputIter, class _UnaryOperation>
_OutputIter transform(_InputIter __first, _InputIter __last,
- _OutputIter __result, _UnaryOperation __opr) {
+ _OutputIter __result, _UnaryOperation __oper) {
for ( ; __first != __last; ++__first, ++__result)
- *__result = __opr(*__first);
+ *__result = __oper(*__first);
return __result;
}